/* Round 2026-11-22j — final template library (cards / invoices / statements) */
.card-gallery-group{margin:18px 0 8px;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted,#66737c)}
.card-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.card-gallery-grid button{display:flex;flex-direction:column;gap:6px;align-items:stretch;padding:8px;border:1px solid var(--border,#dfe5ea);border-radius:12px;background:#EDF0F4;cursor:pointer;text-align:left}
body[data-theme=dark] .card-gallery-grid button{background:#242B33}
.card-gallery-grid button.selected{outline:2px solid var(--accent,#FF7A00);outline-offset:1px}
.card-gallery-grid button img{width:100%;height:auto;border-radius:0;display:block}
.card-gallery-grid button span{font-size:12.5px;font-weight:600;line-height:1.25}
.card-flip{margin:10px auto 0;display:block;padding:9px 18px;border-radius:999px;border:1px solid var(--border,#dfe5ea);background:var(--panel,#fff);font-weight:700;cursor:pointer;min-height:44px}
.card-flip[hidden]{display:none}
#cardMainPreview img{max-width:100%;height:auto;border-radius:0;box-shadow:0 8px 28px rgba(10,25,47,.18)}
body[data-theme=dark] .card-workspace #cardMainPreview{background:#141A21}
/* ── Custom Design (22z tile → 23l Part 7, Boss): gallery ke aakhir
   mein bara button/tile KHATAM — sirf NORMAL size (24px) WhatsApp
   icon + neeche chhoti caption, koi box/chrome nahi. ── */
.card-custom-row{display:flex;justify-content:center;padding:16px 0 6px}
.card-custom-link{display:flex;flex-direction:column;align-items:center;gap:5px;background:none;border:0;text-decoration:none;color:var(--muted,#66737c);cursor:pointer}
.card-custom-link svg{width:32px;height:32px;flex:none;color:#25D366} /* 23ag (Boss): Custom Design wala WhatsApp icon thora bara (24→32px); entry chhoti hi rehti he, caption neeche waisa hi */
.card-custom-link small{font-size:11px;font-weight:600}
.card-photo-editor{align-items:center;gap:10px;flex-wrap:wrap}
.card-photo-editor .card-photo-label{font-weight:700;font-size:13.5px}
.card-photo-editor img{width:52px;height:52px;object-fit:cover;border-radius:50%}
.card-share-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.card-share-actions button{flex:1 1 140px;min-height:48px}
.studio-designs{flex-wrap:wrap}
@media (max-width:480px){.card-gallery-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr))}}
/* Round 2026-11-22k — gallery repair: legacy clean-ui.css rules written for
   the OLD single-list gallery (#cardGalleryGrid as a 3-column grid on the
   wrapper + fixed 82px img height) crushed the grouped gallery into one
   narrow column with letterboxed thumbnails and overlapping group headings.
   Neutralise them here (display layer only; higher specificity wins). */
#cardGalleryGrid{display:block;padding:0}
#cardGalleryGrid .card-gallery-grid button{padding:8px;font-size:inherit;min-width:0}
#cardGalleryGrid .card-gallery-grid button img{width:100%;height:auto;object-fit:initial;aspect-ratio:7/4}
#cardGalleryGrid .card-gallery-grid.vt button img{aspect-ratio:4/7}
#cardGalleryGrid .card-gallery-grid button.vt img{aspect-ratio:4/7} /* 23l Part 6: single numeric grid mein vertical designs ki true shape */
.card-gallery-grid button span{overflow-wrap:anywhere}
.card-spot-chip{align-self:flex-start;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:var(--accent,#FF7A00);color:#fff;line-height:1.6}
[dir="rtl"] .card-gallery-grid button span{line-height:1.9}

/* ── Round 2026-11-23s (Boss: 'Name or icons lgane SE mob app ka
   layout khrab ho gya') — MOBILE LAYOUT REPAIR. Wajah: (1) 23n ke
   icon sweep ne har tab/button mein 16–20px icon jor diya, jis se
   fixed-width rows (tabs, Cash cluster) apni jagah se bahar ho
   gaye; audit-fixes ki '#app .tabs{flex-wrap:wrap!important}' rule
   ne tab bars ko 2 uneven rows mein tor diya. (2) 'POS' → 'Counter
   Sale' lamba label tile/header jagahon par wrap hone laga.
   Ye block templates-final.css mein hai (sab se aakhir load hoti
   hai) taake 23q ke unshipped edits (audit-fixes.css waghera) is
   round mein bilkul na chhuren. Rename aur icons DONO mehfooz —
   sirf layout ki marammat hai. ── */

/* Part 2 (Boss): Parcels ka 'Clear filters' button khatam — 23s mein
   parcels.js freeze hone ki wajah se ye control CSS se hide kiya
   gaya tha; 23z mein control renderer (parcels.js) se hi DELETE ho
   gaya (toolbar wala 'Clear filters' + khaali-list wala 'Saare
   filters saaf karein') aur CSS hide rule bhi khatam kar diya.
   Filter saaf karna All chip / dobara select se hota rahega. */

@media (max-width:899px){
  /* Tab bars: AIK line, scrollable row — wrap khatam. Buttons apni
     natural chaudai se chhote nahi hote (flex:1 0 auto: jagah ho to
     barabar phailte hain, na ho to row scroll hoti hai); active
     underline waisi hi. Modal ke tabs par bhi yahi usool. */
  #app .tabs, #modal .tabs{flex-wrap:nowrap!important; overflow-x:auto!important; scrollbar-width:none; -ms-overflow-style:none}
  #app .tabs::-webkit-scrollbar, #modal .tabs::-webkit-scrollbar{display:none; width:0; height:0}
  #app .tabs button, #modal .tabs button{flex:1 0 auto!important; white-space:nowrap; min-width:0}

  /* Heading ke action buttons (Categories, Bulk upload CSV waghera):
     icon + text AIK line mein compact — bare column block khatam. */
  #app .heading button.kos-act{flex-direction:row!important; min-height:44px; padding:8px 12px; gap:7px}

  /* Cash / Dashboard heading cluster (Owner money / Cash count /
     Closing history) + standalone inline-actions: 104px wali tang
     jagah mein icon+text aik line mein NAHI aata (sab se lamba
     label 'Closing history' ~100px + icon 27px > 92px content) —
     is liye teeno buttons ab UNIFORM icon tiles hain: icon oopar,
     chhota label neeche, sab ki AIK height (54px), koi wrap nahi.
     (Upar wali heading-row rule se zyada specific hai + baad mein
     hai, is liye yahi jeet-ti hai.) Daily summary wala full-width
     button is se bahir hai — wo waisa hi rehta hai. */
  #app .heading .inline-actions button, #app>.inline-actions button{
    flex-direction:column!important; height:54px!important; min-height:54px!important;
    font-size:10.5px!important; line-height:1.1!important; gap:3px!important; padding:5px 4px!important;
    white-space:nowrap; overflow:hidden;
  }
  #app .heading .inline-actions button svg, #app>.inline-actions button svg{width:18px!important; height:18px!important; flex:none}

  /* Home tiles: labels aik line mein rahen — 'Counter Sale' 320px
     par bhi wrap na ho (12px par ~80px, 11px par ~73px; tile ke
     andar ~81px jagah). Tiles ki height grid se barabar rehti hai. */
  .dk-khata a, .dk-more a, .dk-more button{font-size:12px}
  .dk-khata a, .dk-more a, .dk-more button{min-width:0}

  /* List filter row (Date range / Report-PDF): dono buttons ab
     AIK height (40px) + inline icon+text — Reset hatne ke baad
     bachi hui misalignment bhi khatam. */
  .report-action-row{align-items:stretch}
  .report-action-row>button{display:inline-flex!important; align-items:center; justify-content:center; gap:6px; min-height:40px}
  .report-action-row>button svg{width:18px; height:18px; flex:none}

  /* Invoice view ki action row (kos-actrow): 6 actions tang 360px
     mein 3+3 ki do saaf rows mein — labels ko poori jagah milti
     hai, koi squeeze nahi. */
  .kos-actrow{flex-wrap:wrap}
  .kos-actrow .kos-act{flex:1 1 28%}
}

@media (max-width:650px){
  /* List tables ke headers: 'SALE PRICE' jese headers tang column
     mein do lines par toot-te thay — padding/font chhota karke
     aik line ki jagah bana di. */
  #records th, #parcelData th{padding:10px 6px; font-size:9.5px; letter-spacing:.3px; line-height:1.3}

  /* Counter Sale (POS): heading row wrap-safe (H1 + 2 buttons
     360px par ~338px thay), steps ke labels nowrap, bottom bar
     ka total hamesha mehfooz (flex:none), text clip-safe. */
  .pos-heading{flex-wrap:wrap}
  .pos-heading>div{flex:1 1 auto; min-width:0}
  .pos-heading h1{font-size:20px}
  .pos-heading .btn{flex:none}
  .pos-steps button{white-space:nowrap; min-width:0}
  .pos-bottom{overflow:hidden}
  .pos-bottom svg{flex:none}
  .pos-bottom strong{flex:none; white-space:nowrap}
}

@media (max-width:380px){
  /* Sab se tang phones (320–380px): labels aik aur step chhote —
     tiles, tools grid, Cash cluster, POS steps. */
  .dk-khata a, .dk-more a, .dk-more button{font-size:11px}
  .essential-tools a span{font-size:11px}
  .page-options-content #topToolsGrid a{font-size:11px}
  #app .heading .inline-actions button, #app>.inline-actions button{font-size:10px!important; padding-left:2px!important; padding-right:2px!important}
  .pos-steps button{font-size:11px; padding-left:2px; padding-right:2px}
  .pos-bottom{font-size:11.5px}
}

/* ── 2026-11-23u (Boss: 'Jaha icons name ikateh Hena print pdf
   filtr etc sab icons krdo — Is SE mob view b Thek ho jaye ga') ──
   Sirf CROWDED toolbar/action clusters (Print / PDF / Filter /
   Share type) ICON-ONLY: .kos-icoonly wale button ka label text
   chhupta hai (bare text = font-size:0, span label = display:none),
   icon 20px centre mein, tap target ≥44px, title/aria-label
   renderer mein rehta hai. Professional buttons, primary CTA
   (Save/Add/Buy/RESULT), Cancel/Close/Apply class aur DEBIT/
   CREDIT dock pills is se BAHIR hain — un par ye class lagti hi
   nahi. Hover highlight aam button rules se waisa hi rehta hai. */
.kos-icoonly{display:inline-flex!important; align-items:center!important; justify-content:center!important; font-size:0!important; gap:0!important; min-width:44px; min-height:44px; padding:6px 8px!important}
.kos-icoonly>span{display:none!important}
.kos-icoonly svg{width:20px; height:20px; flex:none}

/* ── 2026-11-23w Part 1 (Boss: 'Pdf icon dark screen pr color
   change KR jati') ── PDF icon ka rang HAR theme mein AIK hi:
   outline + band brand orange #FF7A00, fold #FFE0BD, 'PDF' safed.
   audit-fixes.css (frozen) mein dark theme ke #FF9E45 / #FFB066
   variant rules hain — ye sheet sab se aakhir load hoti hai, is
   liye barabar specificity ke ye mirror rules un par jeet-te hain
   aur rang dobara brand par pin ho jata hai. Size waisa hi
   (30x30, filter ke barabar ink-height) — sirf rang fix hai. */
svg.pdf-ico .pdf-doc{stroke:#FF7A00}
svg.pdf-ico .pdf-fold{stroke:#FF7A00; fill:#FFE0BD}
svg.pdf-ico .pdf-band{fill:#FF7A00}
svg.pdf-ico .pdf-txt{fill:#FFFFFF}
body[data-theme="dark"] .party-pdf-btn svg .pdf-doc,
body[data-theme="dark"] .party-pdf-btn svg .pdf-fold{stroke:#FF7A00}
body[data-theme="dark"] .party-pdf-btn svg .pdf-fold{fill:#FFE0BD}
body[data-theme="dark"] .party-pdf-btn svg .pdf-band{fill:#FF7A00}
body[data-theme="dark"] .party-pdf-btn svg .pdf-txt{fill:#FFFFFF}

/* ── 2026-11-23w Part 2 (Boss: 'Or icons na MTlb icon HOTA
   button ke opar icon ni') ── icon ka matlab BARE icon hai —
   button ke oopar icon nahi. Icon-only controls (.kos-icoonly
   set, Party toolbar ke filter/PDF, doc-bar ke Print/Share) se
   button chrome khatam: koi background, border ya pill/chip
   box nahi — sirf glyph, ≥44px invisible tap target waisa hi,
   hover par halki brightness (box nahi banta). Professional
   buttons, direction docks aur CTA is se bahir hain. */
.kos-icoonly{background:transparent!important; border:0!important; box-shadow:none!important}
.kos-icoonly:hover{background:transparent!important; box-shadow:none!important}
.party-tool-btn{background:transparent!important; border:0!important; box-shadow:none!important; color:#FF7A00!important}
.party-tool-btn:hover{background:transparent!important; box-shadow:none!important}
.party-tool-btn.active{background:transparent}
body[data-theme="dark"] .party-tool-btn.active{background:transparent}
.party-tool-btn.active svg path{fill:currentColor}
.kos-docact{background:transparent!important; border:0!important; box-shadow:none!important}
.kos-docact.primary{background:transparent!important; border-color:transparent!important; color:#FF7A00!important}
.kos-docact:hover{background:transparent!important; box-shadow:none!important}

/* ── 2026-11-23z ── document controls (Share / Print, .kos-ico-btn —
   thermal receipt + document studio ki .thermal-actions /
   .studio-downloads wali family) bhi BARE icon hain: 23w ke
   .kos-icoonly usool ke mutabiq in par bhi button chrome (background,
   border, shadow) nahi — sirf glyph, 44px tap target audit-fixes.css
   ki size rule se waisa hi. Professional buttons (Payment / refund,
   Return, Edit purchase) aur Done (dismiss class) is se bahir hain. */
.kos-ico-btn{background:transparent!important; border:0!important; box-shadow:none!important}
.kos-ico-btn:hover{background:transparent!important; box-shadow:none!important}

/* ════════════════════════════════════════════════════════════════
   NIGHT QA 2026-11-23 (Boss: 'jo jo buttons ya layout khrab lag
   rhe wo set karte jao mere bgair hi — me subah au ga') — sirf
   naap kar confirm kiye gaye button/layout defects ki fixes.
   Koi redesign, rang, copy ya feature change NAHI; har fix ke
   sath us ki wajah likhi hai. Boss ki subah ki parakh baqi.
   ════════════════════════════════════════════════════════════════ */

/* N-D1 — Dashboard widgets 360px par screen se bahir: .kos-grid ke
   1fr columns chart svg ki min-content (495px) se phail kar widget
   ko 541px kar dete the. minmax(0,1fr) + widget cap + svg cap. */
.kos-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
@media (max-width:1000px){.kos-grid{grid-template-columns:minmax(0,1fr)}}
.kos-widget{min-width:0; overflow:hidden}
.kos-widget svg{max-width:100%; height:auto}

/* N-D4 — Desktop par ledger ka DEBIT/CREDIT dock 22px ki vertical
   strips mein dab gaya tha: bank-action bar ka padding formula
   calc((100vw - 760px)/2) poori viewport ke liye bana tha, lekin
   bar centred 680px dialog ke ANDAR hai — 1440 par padding hi
   poori chaudi kha kar grid columns 22px kar deti thi. Bar ki
   inline padding modalbody jaisi kar di. Mobile (≤650) par
   audit-fixes ki pill rules (specificity zyada) waisi hi chalti
   hain — wahan dock pehle se theek tha. */
@media (min-width:651px){
  #modal.bank-action-page>.modal-cancel-bar{padding-left:18px; padding-right:18px}
}

/* N-D5 — Entry detail page ka content screen ke kinare se chipka
   tha: page-mode mein modalbody padding 0 hai aur .ed-view ka
   apna inset nahi tha (ledger .own-ledger mein 12px hai). */
.ed-view{padding-left:12px; padding-right:12px}

/* N-D6 — Stock / Bills / Staff tables mobile par per-letter crush
   ('Pre/mi/um…', 'Poste/d', actions card se bahir): table-layout:
   fixed bina column widths ke sab ko barabar tang hisse deta tha.
   Auto layout + har button ka label apni jagah (pair as units
   wrap ho sakta hai, lafz darmiyan se nahi tootta) + badge nowrap. */
@media (max-width:650px){
  .workspace-scroll .tablewrap table:not(#records){table-layout:auto}
  .workspace-scroll .tablewrap td{overflow-wrap:break-word}
  .workspace-scroll .tablewrap td button{white-space:nowrap}
  .workspace-scroll .tablewrap .status{white-space:nowrap}
}

/* N-D7 — Parcels reports strip: 'Draft · Pending' aur 'Cancelled'
   labels aapas mein takra rahe the (nowrap 10px label apni
   column se bara tha). Label ab apni column mein wrap hota hai;
   numbers ki line waisi hi rehti hai. */
@media (max-width:650px){
  .dk-rs-stat small{white-space:normal; line-height:1.25}
}

/* N-D8/N-D11 — Icon-only controls ka asal tap target: .kos-icoonly
   ke 44px min ko kuch purani rules daba kar 32–34px kar rahi
   theen, aur toolbar ke andar Print-slips / Load-sheet pair
   flex-grow se 132px ke adhe-adhe khali dabbe ban gaye the. */
.kos-icoonly{min-width:44px!important; min-height:44px!important}
.toolbar .kos-icoonly{flex:0 0 44px; width:44px; height:44px}
.account-totals .at-chevron{min-width:40px; min-height:40px}
.calc-pane-header>button{min-width:36px; min-height:36px}

/* N-D9 — Header business name chhoti screen par kat raha tha
   (360 par 'Mera Karo…', 320 par 'Mera Kar…'): ≤380 par header ki
   hawa tight + picker flexible; ≤340 par picker ka chevron
   chhupa kar naam ko jagah di — picker ka kaam waisa hi hai. */
@media (max-width:380px){
  main>header{gap:5px}
  .header-parcel-pro{padding-left:8px; padding-right:8px}
  main>header button[aria-label="Login"]{padding-left:10px; padding-right:10px}
  #crumb{flex:1 1 auto; min-width:0}
  #crumb .header-business-picker{flex:1 1 auto; min-width:0; font-size:14px}
  #crumb .header-business-picker span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
}
@media (max-width:340px){
  #crumb .header-business-picker svg{display:none}
}

/* N-D10 — Cash day-row ka party-name chip chhoti screen par naam
   ko 60px (360) / 20px (320) mein daba raha tha: ≤380 par amount
   columns thode tang + chip padding kam, taake naam ko jagah
   mile. Amounts 13.5px par bhi 'Rs 1,98,000' tak fit rehte hain. */
@media (max-width:380px){
  .dk-crow{grid-template-columns:minmax(0,1fr) 78px 86px}
  .dk-chip{padding-left:7px; padding-right:7px}
  .dk-amt{font-size:13.5px}
}

/* N-D12 — Dark theme mein party list ka naam avatar wali tang
   column mein kat raha tha ('Muhammad Ahme…', 85px): pehle
   column ko hissa zyada + naam light jaisa 14px. Sirf dark —
   light pehle se theek naapa gaya tha. */
body[data-theme="dark"] #records th:first-child,
body[data-theme="dark"] #records td:first-child{width:56%}
body[data-theme="dark"] .party-list-title b{font-size:14px}

/* N-D13 — Cash day-group ki date darmiyan se toot rahi thi
   ('MON, 23 NOV' / '26' do lines mein): date block shrink nahi
   hoga, date aik line mein rahegi. */
.dk-day-head>div:first-child{flex:0 0 auto}
.dk-day-head h3{white-space:nowrap}
@media (max-width:380px){.dk-day-head h3{font-size:13px}}

/* N-D14 — Counter Sale scan row: 'Manual Scan' icon-upar-text
   stacked tha, 'Auto Scan' aik line mein — dono aik jese kar
   diye. Category rail mein '+ Category' do lines mein toot
   raha tha — nowrap + chhota tab icon. */
.pos-search button{flex-direction:row; align-items:center; justify-content:center; gap:8px}
.pos-categories button{white-space:nowrap}
.pos-categories .kos-tabbed svg{width:16px; height:16px}

/* N-D15 — Parcel detail ke body mein doosra back arrow tha
   (modal ki navy bar wala asal back hai) — duplicate hata diya.
   Detail hamesha modal mein khulta hai, is liye bar wala back
   har haal mein mojood rehta hai. */
.parcel-invoice-topbar{display:none}

/* N-D6b — Staff table ka asal ghutta Hours column tha: hours
   input apni intrinsic width (216px) se poori table ko 382px
   kar raha tha, status select 36px mein dab gaya tha ('Not
   marked' nazar hi nahi aata tha). Staff page par controls ko
   kaam ke hisaab ki width di — table ab card ke andar fit hai. */
@media (max-width:650px){
  body[data-page="staff"] .tablewrap td{padding-left:6px; padding-right:6px}
  body[data-page="staff"] .tablewrap td input{width:58px}
  body[data-page="staff"] .tablewrap td select{font-size:10.5px; padding-left:4px; padding-right:4px}
  /* Attendance table (jis mein status select hai) ke columns ka
     hissa: Status ko 33% taake 'Not marked' poora nazar aye —
     payroll table (select nahi) is se bahir hai. */
  body[data-page="staff"] #records:has(td select) th:first-child{width:19%}
  body[data-page="staff"] #records:has(td select) th:nth-child(2){width:35%}
  body[data-page="staff"] #records:has(td select) th:nth-child(3){width:21%}
  body[data-page="staff"] #records:has(td select) th:nth-child(4){width:25%}
}

/* N-D9b — 320px par business name phir bhi 14px tang tha:
   header ki bahari padding + picker ki apni padding kam kar
   ke naam ko poori jagah di. Sirf ≤340 (chhoti phones). */
@media (max-width:340px){
  main>header{padding-left:10px; padding-right:10px}
  #crumb .header-business-picker{padding-left:6px; padding-right:6px; font-size:13px}
  #crumb .header-business-picker span{font-size:13px}
}

/* 23ad (Boss) — Parcel detail ke action buttons aik hi line/height
   mein: pehle 'Cancel parcel' 63px uncha tha, baqi 44px — flex line
   mein sab stretch ho kar barabar, text/icon center. */
.parcel-invoice-actions{align-items:stretch}
.parcel-invoice-actions>button{display:inline-flex; align-items:center; justify-content:center; min-height:44px}

/* 23ad (Boss) — Parcels toolbar: search input poori line akeli na
   le; Print slips / Load sheet wale bare icon usi pehli line mein
   search ke sath ikathay rahen (chhote mobile par neeche girna
   khatam). Selects agli lines par wrap hote hain. */
#app .toolbar.kos-parcel-toolbar>input[type="search"]{flex:1 1 110px; min-width:0}

/* 23ae (Boss, Part 2) — ENTRY BARS WhatsApp chat-list jaisi: poori
   bar kinaron tak bleed, text safe area ke andar (16px + safe-area
   inset). Party list, Cash day-list, Expense list aur Ledger table —
   amounts/dates ki settled jagah/size waisi hi. Sirf ≤650px
   (mobile pattern); desktop/tablet ka settled table look barqarar.
   23ag (Boss, correction): NAAM KA SIZE NAHI barhana tha — 23ae ki
   size/weight barhawat (Party 17px/700, Cash note 16px/600, Expense
   15.5px/600) wapas li; asal masla kinaron ki KHAALI JAGA thi: ab
   list wala PANEL khud screen ke kinaron tak jata hai (neeche wali
   rule), jese entry ke andar click karne se full-screen view ati
   hai — bars asal edge tak, text safe padding ke andar hi. */
@media (max-width:650px){
  /* — 23ag: list panels full-bleed — panel screen ke edge tak
     (margin calc(50% - 50vw) ancestor padding se khud adjust);
     side border + gol kinare khatam taake saaf full-width surface
     bane. Andar ke -12px bleed ab panel edge = screen edge tak. */
  body[data-page="party"] .panel:has(>#records),
  body[data-page="expense"] .panel:has(>#records),
  body[data-page="cash"] .panel:has(.dk-cash-list){margin-inline:calc(50% - 50vw); border-left:0; border-right:0; border-radius:0}
  /* — Party list — (max-width:none lazmi: digikhata-mobile ki
     .tablewrap{max-width:100%} bleed ko rok deti thi) */
  body[data-page="party"] #records .tablewrap{margin-inline:-12px; max-width:none}
  body[data-page="party"] #records th:first-child, body[data-page="party"] #records td:first-child{padding-inline-start:calc(16px + env(safe-area-inset-left))}
  body[data-page="party"] #records th:last-child, body[data-page="party"] #records td:last-child{padding-inline-end:calc(16px + env(safe-area-inset-right))}
  body[data-page="party"] .party-list-title{flex-wrap:nowrap}
  body[data-page="party"] .party-list-title>div{min-width:0; flex:1}
  /* 23ag: size/weight ASAL par wapas (14px/400 — clean-ui.css:97 ki
     pin wali settled value); nowrap/ellipsis layout ke liye rehta
     hai (naam avatar ke neeche girne wala bug is se ruka tha) */
  body[data-page="party"] #records .party-list-title b{display:block; font-size:14px!important; font-weight:400!important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
  body[data-page="party"] #records td:last-child strong{white-space:nowrap}
  /* — Cash book (dk day list) — */
  body[data-page="cash"] .dk-cash-list{margin-inline:-12px}
  body[data-page="cash"] .dk-day-head{padding-inline-start:calc(16px + env(safe-area-inset-left)); padding-inline-end:calc(16px + env(safe-area-inset-right))}
  body[data-page="cash"] .dk-crow{padding-inline-start:calc(16px + env(safe-area-inset-left)); padding-inline-end:calc(16px + env(safe-area-inset-right))}
  /* 23ag: .dk-cnote ka 23ae wala 16px/600 hata diya — asal size
     (theme-dk.css:184 ki 13px) wapas */
  /* — Expense list (cashRows table) — */
  body[data-page="expense"] #records .tablewrap{margin-inline:-12px; max-width:none}
  body[data-page="expense"] #records th:first-child, body[data-page="expense"] #records td:first-child{padding-inline-start:calc(16px + env(safe-area-inset-left))}
  body[data-page="expense"] #records th:last-child, body[data-page="expense"] #records td:last-child{padding-inline-end:calc(16px + env(safe-area-inset-right))}
  /* 23ag: expense naam ka 23ae wala 15.5px/600 hata diya — asal
     (pre-23ae cascade) size wapas */
  /* — Ledger (modal table; own-ledger padding 14px he) — */
  .own-ledger .tablewrap{margin-inline:-14px; max-width:none}
  /* 23af (Boss): date+time stamp tang jagah par toot kar waqt
     neeche wali line par aye — audit-fixes ki nowrap!important ko
     mobile par normal kiya; recordDateTime ke NBSP bandh ki wajah
     se break sirf '·' ke baad hota he, date/waqt beech se nahi
     tootte. Desktop par nowrap barqarar. */
  .record-stamp{white-space:normal!important}
  .own-ledger th:first-child, .own-ledger td:first-child{padding-inline-start:calc(16px + env(safe-area-inset-left))}
  .own-ledger th:last-child, .own-ledger td:last-child{padding-inline-end:calc(16px + env(safe-area-inset-right))}
}

/* 23ag Part 4 (Boss: 'edit delete me just icons ho') — ENTRY DETAIL
   ke Edit/Delete BARE icon-only (23n ka icon+text yahan khatam);
   title/aria-label markup mein pehle se maujood hain; Delete ka
   icon halka-red rang (#C62828 / dark #F2766A) rakhta hai, dabba
   aur pale background khatam (parcel/invoice wali kos-icoonly
   misaal). Table rows ke Edit/Delete pairs workspace.js mein
   kos-icoonly class ke sath aate hain. */
.ed-view .ed-editbtn, .ed-view .ed-delbtn{background:transparent!important; border:0!important; box-shadow:none!important; width:auto!important; min-height:44px; padding:8px 10px!important; font-size:0!important; gap:0!important; border-radius:0!important; display:inline-flex!important; align-items:center; justify-content:center}
.ed-view .ed-editbtn>span, .ed-view .ed-delbtn>span{display:none!important}
.ed-view .ed-editbtn svg, .ed-view .ed-delbtn svg{width:22px; height:22px}
.ed-view .ed-delbtn{color:#C62828!important; margin-top:2px}
body[data-theme="dark"] .ed-view .ed-delbtn{color:#F2766A!important}

/* 23ag Part 6 (Boss: 'text b khud adjust ho device k hisab se') —
   Document Studio: design thumbnails device ke hisab se size hon
   (brand.css ki fixed 5-column grid 2-design wale statements ko
   tang kar ke left chipka deti thi, sath khaali jaga reh jati thi);
   preview page khulte hi fit-to-width (zoom reset document-studio
   mein), −/+ zoom us ke upar chalta rehta hai. */
.studio-designs{display:grid; grid-template-columns:repeat(auto-fit,minmax(104px,180px)); justify-content:center; gap:10px}
.studio-thumb{width:100%; height:118px; margin:0 auto 7px}
.studio-real-thumb{width:100%; height:118px; object-fit:cover; object-position:top; margin-bottom:7px}
.document-output .studio-downloads{margin-left:auto}

/* 23ag Part 5 FINAL (Boss, DigiKhata screenshot): Ledger 'Date set'
   sheet — full-width radio rows; preset dates right side par PLAIN
   TEXT (Boss: 'uska icon khtam krna bs' — koi calendar glyph NAHI);
   Calendar row ke neeche poora native date input (tap = picker).
   Rows par app ka uppercase button rule NAHI (screenshot jaisi
   parhne wali surat). */
.due-sheet{padding:2px}
.due-title{font-size:17px; font-weight:700; margin:2px 0 8px}
.due-row{display:flex; align-items:center; gap:12px; width:100%; min-height:56px; padding:10px 6px; background:none; border:0; border-bottom:1px solid var(--line,#DFE6F2); text-align:start; position:relative; cursor:pointer; color:var(--ink); text-transform:none; letter-spacing:normal}
.due-radio{width:22px; height:22px; border-radius:50%; border:2px solid var(--muted,#5D6E8F); flex:none; display:grid; place-items:center}
.due-row.selected .due-radio{border-color:#FF7A00}
.due-row.selected .due-radio::after{content:''; width:12px; height:12px; border-radius:50%; background:#FF7A00}
.due-label{flex:1 1 auto; font-size:15.5px; font-weight:600}
.due-date{font-size:14px; font-weight:600; color:var(--muted,#5D6E8F); white-space:nowrap}
.due-cal-input{position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer}
.due-apply{width:100%; min-height:50px; margin-top:16px}
.due-remove{display:block; width:100%; min-height:44px; margin-top:8px; padding:10px 6px; background:none; border:0; color:#C62828; font-size:14.5px; font-weight:600; text-align:center; cursor:pointer; text-transform:none; letter-spacing:normal}
body[data-theme="dark"] .due-remove{color:#F2766A}

/* ════════════════════════════════════════════════════════════════
   ROUND 2026-11-23ah (Boss ki corrections — refresh ah, label os-53)
   P1 Date-set sheet apni halki overlay (#dueDlg): mobile par
      chhoti bottom sheet, desktop par tile ke paas compact popover —
      #modal wali poori screen NAHI, ledger neeche zinda rehta hai.
   P2/P4 List tables (#records): auto layout (fixed layout ke barabar
      tang hisse khatam), date kabhi darmiyan se nahi tootti
      (overflow-wrap:anywhere ka zor khatam), action pair hamesha
      aik hi line / aik hi axis par.
   P5 Bills rows ka text aik step chhota (stamp waisa hi chhota).
   P6 Filter chips: darmiyan bhi saaf gap, andar (icon→text) bhi —
      koi chipka hua nahi.
   P7 Icon+text action controls: text caption size 11px, icon lead;
      text-only aur primary CTA is se bahir.
   ════════════════════════════════════════════════════════════════ */

/* ── P1: #dueDlg — halki overlay, #modal se alag ─────────────── */
dialog#dueDlg{position:fixed; inset:auto; margin:0; padding:0; border:0;
  border-radius:16px; width:340px; max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px); overflow:auto; color:var(--ink);
  box-shadow:0 24px 70px rgba(7,31,73,.35)}
dialog#dueDlg::backdrop{background:rgba(7,25,55,.48); backdrop-filter:none}
body[data-theme="dark"] dialog#dueDlg{background:#0C1E42; color:#f4f4f5}
dialog#dueDlg .due-sheet{padding:18px 18px 16px}
@media (max-width:650px){
  dialog#dueDlg{left:0; right:0; bottom:0; top:auto; width:100%; max-width:100%;
    border-radius:18px 18px 0 0; box-shadow:0 -12px 44px rgba(7,31,73,.30);
    max-height:86dvh}
}

/* ── P4: do-line stamp ki date wali line kabhi na toote ──────── */
.kos-dline{white-space:nowrap}

/* ── P2/P4: list tables — pair aik axis par, date poori ────────
   Aakhri cell nowrap + darmiyan (middle): pair hamesha aik saath
   aik axis par. Bills/Staff par ≤650 mein auto layout (fixed ki
   barabar-kushai khatam — date ki poori chaudi bhi wapas milti
   hai); Stock fixed hi rehta hai magar tay hissay ke sath taake
   pair apni jagah par aye; Party ka settled fixed regime waisa hi. */
#records td:last-child{white-space:nowrap; vertical-align:middle}
@media (max-width:650px){
  body[data-page="bills"] #records table, body[data-page="staff"] #records table{table-layout:auto}
  body[data-page="bills"] #records td, body[data-page="staff"] #records td{overflow-wrap:normal}
  #records td button{white-space:nowrap}
  body[data-page="stock"] #records .tablewrap table{table-layout:fixed}
  body[data-page="stock"] #records th:nth-child(1){width:33%}
  body[data-page="stock"] #records th:nth-child(2){width:13%}
  body[data-page="stock"] #records th:nth-child(3){width:9%}
  body[data-page="stock"] #records th:nth-child(4){width:11%}
  body[data-page="stock"] #records th:nth-child(5){width:34%}
  body[data-page="stock"] #records .item-cell{white-space:normal; gap:4px}
  body[data-page="stock"] #records .item-cell .link{white-space:normal; text-align:left}
  body[data-page="stock"] #records th{overflow-wrap:anywhere; font-size:10px}
  body[data-page="stock"] #records td{overflow-wrap:normal; padding-left:4px; padding-right:4px}
}

/* ── P5: bills rows — text aik step chhota ───────────────────── */
body[data-page="bills"] #records td{font-size:11px}
body[data-page="bills"] #records td:first-child .link{font-size:13px; font-weight:600}

/* ── P6: filter chips — gap bahir bhi, andar bhi ───────────────
   (#app .toolbar wali (1,1,1) rule se jeetne ke liye selector
   mazboot rakha hai — wahi rule chips ko 34px/6px par pin karti thi) */
#app .toolbar.kos-parcel-toolbar{gap:10px}
#app .toolbar.kos-parcel-toolbar select{min-height:38px; padding:0 10px; border-radius:10px}
#app .toolbar.kos-parcel-toolbar>button:not(.kos-icoonly):not(.kos-conn-head){display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:0 12px}
.report-action-row{gap:10px}
.report-action-row button:not(.kos-icoonly){display:inline-flex; align-items:center; gap:8px}

/* ── P7: icon+text action controls — text caption size ───────── */
.kos-act:not(.primary){font-size:11px}
.ledger-tiles button span{font-size:11px}
.pos-search button{font-size:11px}
.pos-pay-methods button{font-size:11px}
#app .report-action-row>button:not(.kos-icoonly){font-size:11px}

/* ── P2/P8 (doosri parakh): bills/stock list panels bhi kinaron
   tak (23ae/23ag wala full-bleed pattern — party/cash/expense ki
   tarah); table ki chaudi wapas milti hai to pair + poori date
   bina scroll ke fit hote hain. Pair ke dono button aik hi
   height (44) par — darmiyan ka axis aik. ─────────────────────── */
#records td:last-child button{vertical-align:middle}
@media (max-width:650px){
  body[data-page="bills"] .panel:has(>#records),
  body[data-page="stock"] .panel:has(>#records){margin-inline:calc(50% - 50vw); border-left:0; border-right:0; border-radius:0}
  body[data-page="bills"] #records .tablewrap,
  body[data-page="stock"] #records .tablewrap{margin-inline:-6px; max-width:none}
  #records td{padding-left:5px; padding-right:5px}
  #records td:last-child button{min-height:44px}
}

/* ════════════════════════════════════════════════════════════════
   2026-11-23ai — THERMAL RECEIPT ACTIONS (Boss ki screenshot
   2026-11-24 12:51 + Fix 3/5): (1) Share/Print (.kos-ico-btn) ka
   glyph GHAYAB tha — jad do hisso mein: (a) brand.css ki
   .studio-downloads button{color:white} bare-icon rule ke baad
   bhi jeet rahi thi (glyph safed), aur thermal ke andar
   .studio-downloads ki safed sticky bar (background:--surface)
   us ke peeche — safed par safed = bada khaali safed dabba;
   (b) workspace-polish ki '.thermal-actions button{flex:1 1 120px}'
   nested downloads buttons par leak ho kar unhein stack + stretch
   kar rahi thi (naapa: 96×116 ka dabba, do button upar-neeche).
   Ab: glyph ka rang --ink (theme-aware, dono theme mein nazar
   aata hai), flex leak band (flex:0 0 44px), thermal ke andar
   sticky/safed bar khatam. (2) Fix 5: Format wali line apni poori
   row (label + select + Share/Print aik aligned line, 44px);
   Payment/refund · Return · Edit purchase AIK row mein teen
   barabar tiles (icon upar + chhota text — Fix 7 wala stack
   pattern, pehle se .kos-act par maujood column direction);
   Payment ka bada tall square khatam. Done full-width primary
   neeche waisa hi. ════════════════════════════════════════════ */
.kos-ico-btn{color:var(--ink)!important}
.studio-downloads .kos-ico-btn{flex:0 0 44px}
.thermal-actions .studio-downloads{position:static; background:transparent; padding:0; flex-wrap:nowrap}
.thermal-actions .document-output{flex:1 1 100%; min-height:44px}
.thermal-actions>.kos-act:not(.primary){flex:1 1 0; min-height:60px}

/* ════════════════════════════════════════════════════════════
   2026-11-23aj — Fix 6 (Boss: 'Pori app me buttons Align kro
   professional look aye har device') audit ke 2 baqi nits +
   Fix 10 (Boss: 'WhatsApp ka Sirf icon rhe yaha'):
   (1) Ledger ki akeli 'Date range' pill audit-fixes.css mein
       justify-content:flex-end se RIGHT kinare par akeli pari
       thi; baqi har list screen par Date range row ke START par
       he (.report-action-row ka pehla control) — yaha bhi start
       par le aaye (RTL mein flex-start khud mirror ho jata he).
   (2) POS category rail: icon wale buttons 41px, text-only 40px
       — aik line mein oonch-neech; sab ki min-height 41px pin.
   (3) Invoice view ki action row mein WhatsApp (.wa-reminder)
       bada sabz glyph + neeche 'WhatsApp' label ke sath ata tha,
       jabke sathi Share/Print/Edit/Delete sab .kos-icoonly bare
       icons (44x44, glyph 20px) hen. Ab WhatsApp bhi ICON-ONLY:
       label ghayab, 44x44, glyph 20px, sathiyon ki baseline par.
       Rang sabz (.wa-glyph #25D366) waisa hi rehta he.
   ════════════════════════════════════════════════════════════ */
.ledger-range-row{justify-content:flex-start}
#app .pos-categories button{min-height:41px}
#modalbody .inline-actions{align-items:center}
#modalbody .inline-actions .wa-reminder{flex-direction:row!important; flex:1 1 0; min-width:44px!important; height:44px; padding:6px 8px!important; gap:0!important}
#modalbody .inline-actions .wa-reminder small{display:none!important}
#modalbody .inline-actions .wa-reminder svg{width:20px; height:20px}

/* ════════════════════════════════════════════════════════════
   2026-11-23am — Fix 12: Hisaab source options (chips) ki saans
   ki jagah; chips ka look .tabs wala hi he (settled pattern).
   ════════════════════════════════════════════════════════════ */
.hisaab-sources{margin:2px 0 10px}

/* ════════════════════════════════════════════════════════════
   2026-11-23bv — Hisaab source DROPDOWN + full-screen source
   (Boss: 'drop down shopiy or courrier k' + 'Jo selec ho Wohi
   full screen or aye, all pr all'). Body classes parcels.js ki
   kosHisaabChrome() lagati hai, sirf accounts/hisaab par:
   · kos-hisaab-light (koi selection nahi): tamam connection
     cards (API waghera) band — screen sirf summary + dropdown.
   · kos-hisaab-full (aik source): sirf usi source ki card
     wapas; aam hisaab chrome (heading / tabs / toolbar /
     report strip / help) band — screen par sirf wohi source.
   · kos-hisaab-all: koi pabandi nahi, sab cards + combined.
   Cards grid ke andar hon ya bahir, id selectors dono par
   lagte hain (mobile par grid display:contents hai). ════════ */
.hisaab-sourcebar{display:flex;align-items:center;padding:8px 2px 12px}
.hisaab-source-sel{flex:1;min-height:44px;font-weight:600}
.hisaab-full-head{display:flex;align-items:center;gap:10px;margin:2px 0 4px}
.hisaab-full-head h2{margin:0;font-size:20px}
body.kos-hisaab-light #shopifyCard,body.kos-hisaab-light #postexCard,body.kos-hisaab-light #leopardsCard,body.kos-hisaab-light #mnpCard,body.kos-hisaab-light #tcsCard,body.kos-hisaab-light #courierMoreCard,
body.kos-hisaab-full #shopifyCard,body.kos-hisaab-full #postexCard,body.kos-hisaab-full #leopardsCard,body.kos-hisaab-full #mnpCard,body.kos-hisaab-full #tcsCard,body.kos-hisaab-full #courierMoreCard{display:none!important}
body.kos-hisaab-full.kos-hisaab-src-shopify #shopifyCard{display:block!important}
body.kos-hisaab-full.kos-hisaab-src-postex #postexCard{display:block!important}
body.kos-hisaab-full.kos-hisaab-src-leopards #leopardsCard{display:block!important}
body.kos-hisaab-full.kos-hisaab-src-mnp #mnpCard{display:block!important}
body.kos-hisaab-full.kos-hisaab-src-tcs #tcsCard{display:block!important}
body.kos-hisaab-full #app>.heading,body.kos-hisaab-full #app>.tabs,body.kos-hisaab-full #dkReportStrip,body.kos-hisaab-full .workspace-scroll .toolbar,body.kos-hisaab-full .workspace-scroll>p.help{display:none!important}
body.kos-hisaab-full #parcelData .hisaab-full{min-height:55vh}

/* ════════════════════════════════════════════════════════════
   2026-11-23al — Fix 8 CAROUSEL (studio + business cards):
   bare chevron arrows, 20px glyph, 44px tap target; na-applicable
   arrow slot mein hidden (visibility) — grey/disabled NAHI.
   2026-11-23ay — Boss: 'invoice k arrows nazar ni arhe'. Bare hairline
   chevron (ink sirf ~7x12px, stroke ~1.7px) phone par ghayab tha.
   Ab arrow = 44px gol disc (safed + border + halki shadow; dark mein
   navy disc + safed glyph), glyph 22px + stroke 3 — har theme mein
   saaf nazar aye. Position logic wahi (first sirf next, last sirf
   prev, darmiyan dono; hidden = visibility, disc samet).
   Preview surfaces par touch-action:pan-y taake horizontal swipe
   browser scroll na nigal jaye (vertical scroll native rehta).
   ════════════════════════════════════════════════════════════ */
.studio-carousel{display:flex; align-items:center; gap:8px; margin:2px 0 10px}
.studio-car-mid{flex:1; min-width:0; text-align:center}
.studio-car-mid strong{display:block; font-size:14px}
.studio-car-mid span{font-size:11px; color:var(--muted)}
.kos-car-arrow{width:44px; height:44px; flex:none; display:inline-flex; align-items:center; justify-content:center; background:#fff!important; border:1px solid #C9D7F2!important; border-radius:50%!important; box-shadow:0 1px 5px rgba(11,46,99,.16)!important; color:var(--navy); cursor:pointer; padding:0!important}
.kos-car-arrow svg{width:22px; height:22px}
.kos-car-arrow svg path{stroke-width:3}
body[data-theme=dark] .kos-car-arrow{background:#1D4479!important; border-color:#3D5C96!important; box-shadow:0 1px 5px rgba(0,0,0,.45)!important; color:#fff}
.kos-car-hide{visibility:hidden}
/* ════════════════════════════════════════════════════════════
   2026-11-23bd — Boss PHIR: 'invoice me arrow mile n'. Jad:
   arrows header row mein thay — bare preview se ~150px UPAR,
   design-naam ke sath aik patli line mein; pehle design par
   SIRF aik (▶) aur safed disc halke rang par ghayab-si. User
   ki nazar preview par hoti hai, wahan koi arrow NAHI tha.
   Fix: wohi buttons (same id/onclick — toggle logic waisi ki
   waisi) ab PREVIEW KE UPAR overlay hain: kinaron par, gehri
   NAVY disc + safed glyph + safed kinara — safed page par bhi
   aur dark par bhi pehli nazar mein saaf. Studio (invoice +
   ledger) top:180px (pehle page ke andar, pehli screen mein);
   business card par vertical centre. Na-applicable arrow
   visibility:hidden hi rehta hai (first sirf ▶, last sirf ◀).
   ⚠️ 23be ne is PLACEMENT ko supersede kar diya (neeche dekho):
   navy disc waisi ki waisi, magar ab overlay NAHI — alag row.
   ════════════════════════════════════════════════════════════ */
/* ── 2026-11-23be — Boss: 'gol arrow screen k opar nu dene,
   alg se dene'. Overlay placement reject: arrows ab preview /
   document ke UPAR NAHI — apni ALAG control row mein hain:
   [‹ prev] … [design naam / counter] … [next ›]. Wohi NAVY
   disc (44px, safed glyph) jo 23bd ne di thi, bas in-flow.
   Preview area bilkul khaali — koi overlaid control nahi.
   Na-applicable arrow apni slot mein visibility:hidden rehta
   hai, taake row ki layout na jump kare (first sirf ▶ slot,
   last sirf ◀ slot, darmiyan dono). ── */
.studio-carousel .kos-car-arrow,.card-controls .kos-car-arrow{background:#0B2E63!important; border:1.5px solid rgba(255,255,255,.8)!important; box-shadow:0 2px 10px rgba(11,46,99,.45)!important; color:#fff!important}
body[data-theme=dark] .studio-carousel .kos-car-arrow,body[data-theme=dark] .card-controls .kos-car-arrow{background:#0B2E63!important; border-color:rgba(255,255,255,.8)!important; color:#fff!important}
/* ── 2026-11-23bo — Boss PHIR: 'Preview me b mere pas arrow ni
   Arha'. Phone-Preview (360 Fit) par asal parakh: studio ki row
   pehle viewport mein THI, magar (a) darmiyan wala hissa DO
   lines par tha (naam block + counter neeche) — disc us ke
   muqable mein unchi tairti hui lagti thi, row aik control
   nahi lagti thi; (b) 23bd overlay zamane ki safed ring + bhari
   shadow disc ko row ke button ki bajaye floating button
   banati thi. Aur card workspace mein row preview ke NEECHE
   thi — lambi preview ke neeche dab jati thi (business-cards.js
   mein ab row stage se PEHLE hai). Ab: naam + counter AIK hi
   line par (disc ke centre se seedhe), disc wahi gehri navy
   magar ring khatam + halki shadow — row ka hissa lagti hai,
   har theme mein pehli nazar mein saaf. Placement ka settled
   usool waisa hi: apni alag row, document par overlay KABHI
   nahi; na-applicable arrow visibility:hidden hi. ── */
.studio-carousel .kos-car-arrow,.card-controls .kos-car-arrow{border:0!important; box-shadow:0 1px 4px rgba(11,46,99,.28)!important}
body[data-theme=dark] .studio-carousel .kos-car-arrow,body[data-theme=dark] .card-controls .kos-car-arrow{border-color:transparent!important}
.studio-carousel .studio-car-mid strong,.card-controls .card-car-mid strong{display:inline; font-size:14.5px}
.studio-carousel .studio-car-mid span,.card-controls .card-car-mid span{display:inline; margin-left:7px; font-size:11.5px; white-space:nowrap}
.card-controls{gap:10px; padding-left:4px; padding-right:4px}
.card-car-mid{flex:1; min-width:0; text-align:center}
.card-car-mid strong{display:block; font-size:14px; min-width:0}
.card-car-mid span{font-size:11px; color:var(--muted)}
.card-controls #cardDesignPos{font-size:11px; color:var(--muted)}
#studioPages{touch-action:pan-y}
#cardMainPreview{touch-action:pan-y}

/* ════════════════════════════════════════════════════════════
   2026-11-23an — Fix 13 EYE toggle (Boss: 'Balance hide or ankh
   icon kga do khuli or Bnd'): bare icon, 44px tap target, 22px
   glyph. Party summary card me red 'Hide balance' text ki jagah;
   Home cash card (navy gradient) par ankh card ke andar top-right
   safed rang me. State shared + persisted (account-summary.js).
   ════════════════════════════════════════════════════════════ */
.kos-eye{display:inline-flex!important;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;background:transparent!important;border:0!important;box-shadow:none!important;color:var(--ink);cursor:pointer;padding:0!important;vertical-align:middle}
.kos-eye svg{width:22px;height:22px}
.home-cash-wrap{position:relative;display:block}
.home-cash-wrap .kos-eye{position:absolute;bottom:8px;right:10px;color:#fff;z-index:2}

/* ════════════════════════════════════════════════════════════
   2026-11-23ap — Fix 1 (Boss: 'Entry tab side SE full Bada krdo
   text cut Rha he'): entry FORM ka grid track .kos-form-head ke
   nowrap title (453px) se phool kar 531px ho jata tha — har row
   screen se bahir, text side se kata. Ab: track minmax(0,1fr),
   head shrinkable, title WRAP hoga (clip kabhi nahi). Entry
   DETAIL ki date/time stamp bhi ellipsis se kat ti thi — wahan
   bhi wrap (settled rule: waqt poora neeche wali line par, date
   kabhi beech se nahi tootti — recordDateTime ka NBSP glue).
   Ledger table 320px par 4px bahir thi — chhoti screen par
   cell padding/min-width halka sa kam.
   ════════════════════════════════════════════════════════════ */
#modalbody .ed-edit-form{grid-template-columns:minmax(0,1fr)}
#modalbody .ed-edit-form>*{min-width:0}
#modalbody .kos-form-head{min-width:0}
#modalbody .kos-form-head h2{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;min-width:0}
#modalbody .ed-pmeta{min-width:0}
#modalbody .ed-pmeta small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
#modalbody .kos-box>span{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
#modalbody .ed-partyrow{flex-wrap:wrap}
#modalbody .ed-pmeta{flex:1 1 132px}
#modalbody .ed-pmeta b{overflow-wrap:anywhere}
#modalbody .ed-amt{margin-inline-start:auto}
@media(max-width:650px){
  #modalbody .own-ledger td:first-child{min-width:112px}
  #modalbody .own-ledger td,#modalbody .own-ledger th{padding-left:5px;padding-right:5px}
  #modalbody .own-ledger .debit-cell,#modalbody .own-ledger .credit-cell{min-width:72px}
}
/* 23as (Fix 16, Boss): 'Entry pori chodi NHI hui end take le Jao side rhe hi na' —
   ledger ki entry rows pehle se full-bleed (0 -> screen width) then, magar un ka
   TEXT kinare se sirf 5px par tha (23ap ki slim-cell tweak) jabke baqi app ka
   settled safe padding 16px he — text kata hua lagta tha. Ab pehle cell ka text
   left se 16px (+ safe-area) aur aakhri cell ka text right se 16px (+ safe-area);
   darmiyan wale cells 5px hi rahe taake 320px par bhi table fit rahe
   (112 + 72 + 72 + 16 + 16 + andar ke 5px = 308 <= 320). */
@media(max-width:650px){
  #modalbody .own-ledger td:first-child,#modalbody .own-ledger th:first-child{padding-inline-start:16px}
  #modalbody .own-ledger td:last-child,#modalbody .own-ledger th:last-child{padding-inline-end:16px}
}
/* 23at (Boss ki phone report — jad fix): .tablewrap par horizontal touch
   scroll band — thumb swipe ab wrap ko side par nahi ghumata (app ka swipe
   engine hi tabs badalta he); audit-fixes.js ka clamp bacha hua scrollLeft
   bhi 0 par wapas karta he. Is liye pehla column kabhi nahi katega. */
.tablewrap{touch-action:pan-y;overscroll-behavior-x:none}
/* 23at: Bills table ka fit — base td padding (15px) ki wajah se table wrap
   se ~12px wasee tha (yehi scroll mumkin banata tha). Ab cells compact,
   aakhri (actions) cell nowrap: Edit/Delete jora AIK line par, dono icon
   aik hi baseline par (Boss ki screenshot mein jora staggered tha). */
@media(max-width:650px){
  body[data-page="bills"] #records td,body[data-page="bills"] #records th{padding-left:6px;padding-right:6px}
  body[data-page="bills"] #records td:last-child,body[data-page="bills"] #records th:last-child{white-space:nowrap}
  body[data-page="bills"] #records td:last-child button{display:inline-flex;vertical-align:middle}
  body[data-page="stock"] #records td,body[data-page="stock"] #records th{padding-left:8px;padding-right:8px}
  body[data-page="stock"] #records td:last-child,body[data-page="stock"] #records th:last-child{white-space:nowrap}
  body[data-page="stock"] #records td:last-child button{display:inline-flex;vertical-align:middle}
}
/* 23at (jad fix, hissa 2): Bills table FULL-BLEED + FIXED LAYOUT. Panel pehle
   hi 0->width he; wrap us ke 12px padding ke andar 348 par rukta tha aur
   table 388 wasee thi — is liye side scroll mumkin tha. Ab wrap panel ki
   padding se bahir nikal kar 0->width, table fixed layout mein % columns
   ke sath HAR width par bilkul fit: scrollWidth == clientWidth, side
   scroll namumkin, Edit/Delete jora hamesha aik line par andar. Pehle/
   aakhri cell ka text settled 16px/12px par. */
@media(max-width:650px){
  body[data-page="bills"] #records .tablewrap{margin-inline:-12px}
  body[data-page="bills"] #records .tablewrap table{table-layout:fixed;width:100%}
  body[data-page="bills"] #records th:nth-child(1),body[data-page="bills"] #records td:nth-child(1){width:28%}
  body[data-page="bills"] #records th:nth-child(2),body[data-page="bills"] #records td:nth-child(2){width:15%}
  body[data-page="bills"] #records th:nth-child(3),body[data-page="bills"] #records td:nth-child(3){width:16%}
  body[data-page="bills"] #records th:nth-child(4),body[data-page="bills"] #records td:nth-child(4){width:15%}
  body[data-page="bills"] #records th:nth-child(5),body[data-page="bills"] #records td:nth-child(5){width:26%}
  body[data-page="bills"] #records td:nth-child(2){overflow-wrap:anywhere}
  body[data-page="bills"] #records td:nth-child(3){font-size:10.5px;white-space:nowrap}
  body[data-page="bills"] #records td:nth-child(1) .record-stamp,body[data-page="bills"] #records td:nth-child(1) .kos-dline{font-size:10px}
  body[data-page="bills"] #records td:first-child,body[data-page="bills"] #records th:first-child{padding-inline-start:16px}
  body[data-page="bills"] #records td:last-child,body[data-page="bills"] #records th:last-child{padding-inline-end:12px}
}
@media(max-width:380px){
  body[data-page="bills"] #records td:last-child button{width:40px;height:40px;min-width:40px;min-height:40px}
}
/* 23au (Fix 17, Boss): Party DP — photo ho to avatar ki jagah photo
   (list, ledger header, picker, entry detail — sab accountAvatar se);
   na ho to letter avatar waisa hi. Form mein preview + Remove. */
.party-avatar{overflow:hidden}
.party-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.party-photo-prev{display:flex;align-items:center;gap:10px}
.party-photo-prev img{width:52px;height:52px;border-radius:50%;object-fit:cover;display:block}

/* ═══ 23aw (Boss ki phone screenshot 14:21, 23av build) ═══
   D1 — Bills summary cards: .stats ke cards kisi bhi halat mein
   collapse/clip na hon (height/max-height/overflow ki pabandi
   khatam); sath workspace-polish.js ab har naye page par
   .workspace-scroll ka scrollTop 0 karta hai taake scroller ka
   bacha hua offset pehle block (stats) ko upar se kaat na sake.
   D2 — List panels ka full-bleed ab SIRF :has() par munhasir
   nahi: setupListViewport har list panel par .kos-list-panel
   class lagata hai aur ye rule usi class par kinara-ta-kinara
   shakal deti hai — party/cash/expense/bills/stock ke sath ab
   STAFF aur PARCELS (orders) bhi. Panel khud edge par ho to
   us ka overflow:hidden table ko screen ke kinare par hi
   clip karta hai; side par pale patti nahi banti. Stock/Staff
   ke tablewrap ko bhi -12px bleed + kinare wale cells ko
   settled 16px/12px padding.
   D3 — Bills Party column: overflow-wrap:anywhere KHATAM —
   lafz beech se kabhi nahi tootega ('Custome/r' wala bug).
   Columns dobara weighted (canvas par asli text naap kar):
   date line 72px, 'Customer' 50.5px, 'Rs 125,000' 53.2px,
   Posted chip ~40px (9.5px + 4/5 padding), Edit/Delete jora
   80px — sab aik sath 360 par fit, jora aik hi line par. */
@media(max-width:650px){
  #app .panel.kos-list-panel{margin-inline:calc(50% - 50vw); border-left:0; border-right:0; border-radius:0}
  body[data-list-workspace="true"] .workspace-scroll .stats>*{height:auto!important; max-height:none!important; overflow:visible!important}
  body[data-page="stock"] #records .tablewrap{margin-inline:-12px; max-width:none}
  body[data-page="stock"] #records td:first-child,body[data-page="stock"] #records th:first-child{padding-inline-start:16px}
  body[data-page="stock"] #records td:last-child,body[data-page="stock"] #records th:last-child{padding-inline-end:12px}
  body[data-page="staff"] #records .tablewrap{margin-inline:-12px; max-width:none}
  body[data-page="staff"] #records td:first-child,body[data-page="staff"] #records th:first-child{padding-inline-start:16px}
  body[data-page="staff"] #records td:last-child,body[data-page="staff"] #records th:last-child{padding-inline-end:12px}
  body[data-page="bills"] #records td,body[data-page="bills"] #records th{padding-left:4px;padding-right:4px}
  body[data-page="bills"] #records th:nth-child(1),body[data-page="bills"] #records td:nth-child(1){width:25%}
  body[data-page="bills"] #records th:nth-child(2),body[data-page="bills"] #records td:nth-child(2){width:17%}
  body[data-page="bills"] #records th:nth-child(3),body[data-page="bills"] #records td:nth-child(3){width:18%}
  body[data-page="bills"] #records th:nth-child(4),body[data-page="bills"] #records td:nth-child(4){width:13%}
  body[data-page="bills"] #records th:nth-child(5),body[data-page="bills"] #records td:nth-child(5){width:27%}
  body[data-page="bills"] #records td:nth-child(2){overflow-wrap:normal}
  body[data-page="bills"] #records .status{font-size:9.5px; padding:4px 5px}
}
@media(max-width:380px){
  body[data-page="bills"] #records td:nth-child(1) .record-stamp,body[data-page="bills"] #records td:nth-child(1) .kos-dline{font-size:9.5px}
}

/* ===== 2026-11-23ax — STOCK main table: header lafz kabhi beech se nahi
   toot'ta. Wajah: purani fixed shares (33/13/9/11/34) + th par
   overflow-wrap:anywhere — 'Available' ko 32px milta tha, lafz ~55px ka,
   is liye AV/AIL/AB/LE stack hota tha aur 'Clothing' agle cell mein ghus
   kar 'Clothing12' banta tha. Fix sirf main inventory table par
   (kos-stock-main): word-boundary wrap, header 9.5px + letter-spacing 0,
   shares dobara balanced, row links 13px (bills jese). ≤380 par
   Category/unit column item ke naam ke neeche fold ho jata hai —
   4 columns mein har lafz whole rehta hai. ===== */
body[data-page="stock"] #records .kos-item-cat{display:none}
@media(max-width:650px){
  body[data-page="stock"] #records table.kos-stock-main th{overflow-wrap:normal; word-break:normal; letter-spacing:0; font-size:9.5px}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(1){width:29.5%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(2){width:15%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(3){width:15%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(4){width:9%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(5){width:31.5%}
  body[data-page="stock"] #records table.kos-stock-main td{padding-inline-start:3px; padding-inline-end:3px}
  body[data-page="stock"] #records table.kos-stock-main td:first-child{padding-inline-start:16px}
  body[data-page="stock"] #records table.kos-stock-main td:last-child{padding-inline-end:12px}
  body[data-page="stock"] #records td .link{font-size:13px}
}
@media(max-width:350px){
  body[data-page="stock"] #records table.kos-stock-main th{font-size:9px}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(1){width:33%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(2){display:none}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(3){width:17%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(4){width:11%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(5){width:39%}
  body[data-page="stock"] #records table.kos-stock-main td:nth-child(2){display:none}
  body[data-page="stock"] #records .item-cell{flex-wrap:wrap}
  body[data-page="stock"] #records .item-cell .tiny-photo{display:none}
  body[data-page="stock"] #records .item-cell img{flex:1 1 100%; width:36px; height:36px}
  body[data-page="stock"] #records .kos-item-cat{display:block; flex:1 1 100%; font-size:11px; line-height:1.5; color:var(--muted); white-space:normal}
}

/* ════════════════════════════════════════════════════════════
   2026-11-23ay — (1) LIST PANELS POORI APP (Boss: 'pori app me',
   ledger wali edge-to-edge shakal har list par): full-bleed ab
   .kos-list-panel class par bhi munhasir nahi — list-workspace
   pages par .workspace-scroll ka HAR direct-child panel kinara-
   ta-kinara (ledger jesa). Class wali rule (uper, 23aw) bhi
   barqarar hai; ye structural hai, tag/:has/wrapper-order ki
   kharabi se mehfooz. Recycle Bin bhi ab list workspace hai
   (workspace-polish.js: enabled list + .tablewrap tagging).
   (2) PARTY SUMMARY CARD CHEVRON (Boss ki screenshot): at-chevron
   right:2px par card ke border se chipka hua aadha kata lagta
   tha — ab settled padding ke andar (right:12px; RTL left:12px)
   aur values ko us ke liye poori jagah (44px) milti hai.
   ════════════════════════════════════════════════════════════ */
@media(max-width:650px){
  body[data-list-workspace="true"] #app .workspace-scroll>.panel{margin-inline:calc(50% - 50vw); border-left:0; border-right:0; border-radius:0}
  body[data-page="recycle"] #app .panel .tablewrap{margin-inline:-12px; max-width:none}
  body[data-page="recycle"] #app .panel td:first-child,body[data-page="recycle"] #app .panel th:first-child{padding-inline-start:16px}
  body[data-page="recycle"] #app .panel td:last-child,body[data-page="recycle"] #app .panel th:last-child{padding-inline-end:12px}
}
.account-totals .at-chevron{right:12px}
.account-totals .account-total-values{padding-right:44px}
html[dir="rtl"] .account-totals .at-chevron{right:auto; left:12px}
html[dir="rtl"] .account-totals .account-total-values{padding-right:0; padding-left:44px}

/* ════════════════════════════════════════════════════════════
   2026-11-23az — SIDE SHADOW + PAINT FULL-BLEED (Boss: 'side pr
   shadow arha shyd is waja se ni ho rha' + 'abhi ni full ni hua').
   Pixel naap (probe23az) se DO jad pakri gayin:
   (1) SHADOW: band sidebar (translateX(-105%) par khari) ki
   box-shadow '12px 0 40px #0005' (clean-ui.css; RTL mein
   audit-fixes.css ki '-12px 0 40px') band haalat mein bhi screen
   ke andar beh rahi thi — kinare par ~44px ki grey gradient
   patti har screen par, (208,210,214) se halki hoti hui. Ab
   band haalat mein saya NAHI; saya sirf khuli drawer
   (mobile-side-open) par wapas ata hai.
   (2) PAINT CLIP: panel ka border-box 0→W tha (23ay ke rects
   theek thay) magar us ki safed PAINT .workspace-scroll
   (overflow:auto, 16→W-16) aur #app (overflow:hidden, 16→W-16)
   ke padding box par kat jati thi — asal rang sirf 16→W-16
   tak jata tha, dono taraf body tint #F5F7FC (245,247,252) ki
   16px patti reh jati thi. Ledger modal body-level par hai,
   is liye wahan ye clip nahi — wahi asal farq tha. Ab list
   pages par #app khud kinara-ta-kinara hai (margin-inline
   calc(50% - 50vw)) aur .workspace-scroll ko padding-inline:
   16px di hai — content box wohi purana 16→W-16 rehta hai
   (koi child aik pixel nahi hilta, scroll barqarar), magar
   clip box ab poora viewport hai, is liye panel ki paint
   ledger ki tarah aakhri pixel tak jati hai. List panels ka
   apna box-shadow (digikhata-mobile.css .05 wala) bhi khatam
   — kinara bilkul flat.
   ════════════════════════════════════════════════════════════ */
@media(max-width:650px){
  body>aside{box-shadow:none}
  body.mobile-side-open>aside{box-shadow:12px 0 40px #0005}
  html[dir="rtl"] body>aside{box-shadow:none}
  html[dir="rtl"] body.mobile-side-open>aside{box-shadow:-12px 0 40px #0005}
  body[data-list-workspace="true"] #app{margin-inline:calc(50% - 50vw)}
  body[data-list-workspace="true"] .workspace-scroll{padding-inline:16px}
  body[data-list-workspace="true"] #app .panel{box-shadow:none!important}
}

/* ════════════════════════════════════════════════════════════
   2026-11-23ba — HEADING SAFE INSET + CHEVRON SPACE + CLIP FIXES
   (Boss ki apni Chrome parakh, 2026-11-24):
   (A) List pages par 23az ke bleed ke baad page heading
   (.heading, jo .workspace-scroll se BAHIR hai) kinare se chipak
   gayi thi: EN/Roman mein pehla harf x=0 par, Urdu RTL mein
   aakhri harf x=W par — dono taraf kata hua lagta tha. Ab list
   pages ki heading hamesha settled 16px safe inset par hai,
   dono directions mein. (POS/Dashboard pehle se 16px par thay —
   wo list-workspace nahi, un par ye rule lagu nahi.)
   (D) Party summary card se duplicate chevron button hat gaya
   (sirf AANKH toggle bacha) — us ke liye reserve 44px jagah bhi
   khatam, taake amounts poori jagah istemal karein.
   (C) Cash heading tiles (≤899 fixed 54px + overflow hidden +
   nowrap): Urdu ke lambay labels (line-height 2) kat sakte thay —
   ab tile lambai ke hisaab se barhta hai, text tile ke andar
   saaf wrap hota hai, kata kabhi nahi.
   Connections sub-line ('Shopify · PostEx · …') ellipsis se kat
   ti thi — ab wrap hoti hai.
   Stock table headers (23ax ke baad bhi ~4px squeeze: 'Available'
   / 'Category / unit' / 'Sale price') — font 9px + halki share
   rebalance + saaf wrap.
   ════════════════════════════════════════════════════════════ */
@media(max-width:650px){
  body[data-list-workspace="true"] .heading{padding-inline:16px}
  #app .kos-conn-sub{white-space:normal; overflow:visible; text-overflow:clip}
  /* Invoices toolbar (Boss: parcels pattern) — report-toolbar asal
     mein COLUMN flex hai (workspace-polish); kos-parcel-toolbar
     haalat mein pehli line search + PDF icon ki ROW hai, Date
     range wali action-row poori doosri line par. */
  #app .toolbar.report-toolbar.kos-parcel-toolbar{flex-direction:row!important; flex-wrap:wrap!important; align-items:center!important}
  #app .toolbar.report-toolbar.kos-parcel-toolbar>input[type=search]{flex:1 1 110px!important; width:auto!important; min-width:0}
  #app .toolbar.report-toolbar.kos-parcel-toolbar>.report-action-row{flex:1 0 100%}
  /* Search placeholder ki slack: 16px par 'Reference / customer'
     kuch devices par kinare se kat jata tha — 14px par har device
     par poora fit. */
  #app .toolbar.kos-parcel-toolbar>input[type=search]{font-size:14px}
  body[data-page="stock"] #records table.kos-stock-main th{white-space:normal; font-size:9px; letter-spacing:-.2px}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(1){width:29%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(2){width:15.5%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(3){width:15.5%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(4){width:9.5%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(5){width:30.5%}
}
@media(max-width:899px){
  #app .heading .inline-actions button, #app>.inline-actions button{height:auto; min-height:54px; white-space:normal}
}
body #app .account-totals .account-total-values{padding-right:0}
html[dir="rtl"] body #app .account-totals .account-total-values{padding-right:0; padding-left:0}
/* ════════════════════════════════════════════════════════════
   2026-11-24 23bt — Boss: 'Good — arrow chote rakho card or
   invoice me b': design-carousel ke discs 44px se chhote —
   visual disc 33px, chevron 22px se 16px. Jagah (alag row,
   preview/document ke upar NAHI), pehla/aakhri par hidden-with-
   space wala usool aur mid (design naam + counter aik line)
   bilkul waisa hi. Teeno surfaces aik hi class (.kos-car-arrow)
   se chalte hain — bill view + Document Studio (.studio-
   carousel) aur Business Card (.card-controls) — tabdeeli
   teeno par aik sath lagti hai. */
.kos-car-arrow{width:33px; height:33px; min-height:33px!important}
.kos-car-arrow svg{width:16px; height:16px}

/* ════════════════════════════════════════════════════════════
   2026-11-24 — INVENTORY ROUND (Boss: 'inventory me text kat ho
   rahe' + 'opar wale button zyada hen is liye' + 'Stock out
   nazar hi ni ata' + 'niche b aise'): sirf stock page, ≤650px.
   (1) TABS: paanchon tabs AIK line mein fit — row ka sideways
   scroll khatam, Stock OUT hamesha pehli screen mein. Mobile par
   tab icons chhupe (text-only) taake har tab ko poori jagah mile;
   desktop par icons waisay hi rehte hain.
   (2) Heading ka Categories button ab bare icon-only hai
   (kos-icoonly, product-refinements.js) — yahan sirf us ki
   flex:1 wali 174px chaudai khatam ki hai (44px tap target).
   (3) MAIN TABLE: Category/unit column ≤650 par bhi item ke naam
   ke neeche fold (kos-item-cat sub-line) — shares dobara
   balanced (Item 43 / Available 14 / Sale price 14 / Actions
   29): photo rows mein naam word-boundary par wrap hota hai,
   koi lafz beech se nahi kat'ta, qeemat aik line mein aati hai.
   (4) HAR stock table ke headers par overflow-wrap:normal —
   movements/rate-list ke 'QUANTITY'/'RATE' ka beech se tootna
   (purani anywhere rule) khatam; td ke name links bhi
   white-space:normal — lamba naam cell ke andar hi wrap hota
   hai, table 360 se bahir nahi jati. Aakhri column (Amount /
   Sale price) ka purana nowrap bhi khatam — bari rakam
   'Rs' ke baad wrap ho jati hai, cell se bahir nahi behkti.
   Movements table (jis mein .record-stamp hota hai) ke shares
   alag balanced: Item 32 / Quantity 18 / Rate 22 / Amount 28 —
   8-digit rakam bhi aik line mein sama jati hai. Isi width fix
   se un tabs par panel swipe bhi unblock ho jata hai
   (scrollable .tablewrap ko swipe engine andar ka scroller
   samajh kar step rok deta tha).
   ════════════════════════════════════════════════════════════ */
@media(max-width:650px){
  body[data-page="stock"] #app .tabs{overflow-x:visible!important; flex-wrap:nowrap!important}
  body[data-page="stock"] #app .tabs button{flex:1 1 0%!important; min-width:0; white-space:normal; text-align:center; padding-inline:2px; font-size:12.5px; line-height:1.25}
  body[data-page="stock"] #app .tabs button svg{display:none}
  body[data-page="stock"] #app>.heading>button[onclick="manageStockCategories()"]{flex:0 0 auto!important}
  body[data-page="stock"] #records th{overflow-wrap:normal; word-break:normal}
  body[data-page="stock"] #records td .link{white-space:normal}
  body[data-page="stock"] #records table:not(.kos-stock-main) td:last-child, body[data-page="stock"] #records table:not(.kos-stock-main) th:last-child{white-space:normal}
  body[data-page="stock"] #records table:has(.record-stamp) th{padding-inline:4px}
  body[data-page="stock"] #records table:has(.record-stamp) th:nth-child(1){width:32%}
  body[data-page="stock"] #records table:has(.record-stamp) th:nth-child(2){width:18%}
  body[data-page="stock"] #records table:has(.record-stamp) th:nth-child(3){width:22%}
  body[data-page="stock"] #records table:has(.record-stamp) th:nth-child(4){width:28%}
  body[data-page="stock"] #records table.kos-stock-main th{padding-inline:2px}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(1){width:43%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(2){display:none}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(3){width:14%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(4){width:14%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(5){width:29%}
  body[data-page="stock"] #records table.kos-stock-main td:nth-child(2){display:none}
  body[data-page="stock"] #records .item-cell{flex-wrap:wrap}
  body[data-page="stock"] #records .item-cell img{width:44px; height:44px; flex:none}
  body[data-page="stock"] #records .item-cell .tiny-photo{display:none}
  body[data-page="stock"] #records .item-cell .link{flex:1 1 auto; min-width:0}
  body[data-page="stock"] #records .kos-item-cat{display:block; flex:1 1 100%; font-size:11px; line-height:1.5; color:var(--muted); white-space:normal}
}
@media(max-width:350px){
  body[data-page="stock"] #app .tabs button{font-size:12px}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(1){width:40%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(3){width:14%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(4){width:15%}
  body[data-page="stock"] #records table.kos-stock-main th:nth-child(5){width:31%}
  body[data-page="stock"] #records table.kos-stock-main td:nth-child(5) .link:first-child{font-size:12px}
  body[data-page="stock"] #records .item-cell img{flex:1 1 100%; width:36px; height:36px}
}

/* ════════════════════════════════════════════════════════════════════
   23bz (Boss batch 2026-11-24 22:52)
   1) Party ledger ⋮ name ke peeche chhup jata tha: khula menu
      (.page-options-content, z 50) close-bar ke stacking context
      (z 4) mein band tha aur ledger ka sticky header (z 4, DOM mein
      baad) us ke OPAR paint ho jata tha — Convert/Business Card
      buttons name-card ke neeche dab jate thay. Bar ko modal ke
      andar sab se oopar (z 60) kar diya; RTL mein ⋮ aur menu ka
      kinara mirror (workspace-polish ka margin-left:auto LTR ke
      liye tha, Urdu mein menu screen se bahir latak jata tha).
   4) List toolbar AIK row: search + bare icons (Parcels/Invoices
      pattern); Date range ab calendar bare icon hai, range set ho
      to orange dot.
   2) DP/logo — WhatsApp pattern: preview hi tap target (gol DP /
      rounded logo plate + orange camera badge); alag Choose-file
      control kahin nahi.
   ════════════════════════════════════════════════════════════════════ */
#modal>.modal-close-bar{position:relative;z-index:60}
[dir="rtl"] #modal .page-options{margin-left:0;margin-right:auto}
[dir="rtl"] #modal .page-options-content{right:auto;left:0}
.report-toolbar{flex-direction:row!important;align-items:center!important;flex-wrap:nowrap!important}
.report-toolbar>input[type="search"]{flex:1 1 auto!important;width:auto!important;min-width:0}
.report-toolbar>.kos-icoonly{flex:none}
.kos-range-btn{position:relative}
.kos-range-btn.kos-range-on{color:var(--orange,#FF7A00)!important}
.kos-range-btn.kos-range-on::after{content:"";position:absolute;top:7px;inset-inline-end:7px;width:7px;height:7px;border-radius:50%;background:var(--orange,#FF7A00)}
.party-photo-panel{display:flex;gap:26px;flex-wrap:wrap}
.ppp-item{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center}
.ppp-item small{font-size:11px;color:var(--muted)}
.ppp-tap{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid var(--line);background:var(--panel,#fff)}
.ppp-dp{width:76px;height:76px;border-radius:50%}
.ppp-logo{width:76px;height:76px;border-radius:18px}
.ppp-tap img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.ppp-logo img{object-fit:contain;padding:6px}
.ppp-letter{font-size:27px;font-weight:700;color:var(--navy,#0B2E63);display:inline-flex}
.ppp-letter svg{width:30px;height:30px}
.ppp-badge{position:absolute;bottom:-2px;inset-inline-end:-2px;width:25px;height:25px;border-radius:50%;background:var(--orange,#FF7A00);color:#fff;display:flex;align-items:center;justify-content:center;border:2px solid var(--surface,#fff);z-index:2}
.ppp-badge svg{width:13px;height:13px}
.ppp-remove{font-size:12px;min-height:32px}
.profile-logo-tap{position:relative;display:inline-flex;cursor:pointer}
.profile-logo-view{display:inline-flex;align-items:center;justify-content:center;min-width:120px;max-width:200px;height:76px;padding:8px;border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden}
.profile-logo-view img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.profile-logo-ph{color:var(--muted);display:inline-flex}
.profile-logo-tap .ppp-badge{bottom:-4px;inset-inline-end:-4px}
.card-tap{position:relative;display:inline-flex;cursor:pointer}
.card-tap-view{position:relative;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--line);background:#fff}
.card-tap-logo .card-tap-view{min-width:120px;max-width:200px;height:70px;padding:6px;border-radius:12px}
.card-tap-logo .card-tap-view img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.card-tap-photo .card-tap-view{width:76px;height:76px;border-radius:50%}
.card-tap-photo .card-tap-view img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.card-tap-ph{color:var(--muted);display:inline-flex}
.card-tap .ppp-badge{bottom:-3px;inset-inline-end:-3px}

/* ═══ 23ce Item 6 (Boss: 'Urdu me hide ankh apni jaga ni badalti —
   text k opar arhi') ═══
   Home Cash Book card ki ankh physical `right:10px` par thi
   (oopar wali 23an rule) — Urdu RTL mein bhi DAYEIN kinare par hi
   rehti thi, jahan RTL flow mein 'Cash In' ka label + amount betha
   hota hai; ankh usi text ke OPAR charh jati thi. Ab
   inset-inline-end: LTR mein right hi hai (EN/Roman mein zero
   tabdeeli), RTL mein mirror ho kar BAyein kinare — jahan LTR ki
   tarah khaali corner hai. Party summary card ki ankh grid
   placement (clean-ui) se pehle hi mirror hoti hai — before/after
   parakh mein wahan overlap 0 aur jagah mirrored mili, is liye
   wahan koi tabdeeli NAHI ki. */
.home-cash-wrap .kos-eye{right:auto;inset-inline-end:10px}
