/* Desktop window look for iPOS apps (desk-chrome.js) - iPOS.NET Wazirabad */

/* ---------- login: a landscape card (780 x 520) - brand panel on the left, users / PIN on the right ---------- */
body.dc-login #ipw { display: flex; align-items: center; justify-content: center; grid-template-columns: none; overflow: hidden; padding: 0; }
body.dc-login #ipw .ipw-l, body.dc-login #ipw .ipw-by, body.dc-login #ipw .ipw-chead, body.dc-login #ipw .ipw-cfoot { display: none; }
body.dc-login #ipw .ipw-r { min-height: 0; padding: 16px; margin: 0; width: 100%; height: 100%; }
body.dc-login #ipw .ipw-card { position: relative; width: 780px; max-width: 100%; height: 520px; max-height: 100%; padding: 0; border-top: 0; border-radius: 18px; overflow: hidden;
  display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body.dc-login #ipw .ipw-cb { grid-column: 2; grid-row: 1; margin: 0; padding: 36px 28px 12px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; }
body.dc-login #ipw .ipw-cb h2 { font-size: 17px; margin-bottom: 2px; }
body.dc-login #ipw .ipw-cb p { font-size: 12.5px; margin-bottom: 12px; }
body.dc-login #ipw .ipw-note { margin-bottom: 10px; padding: 6px 10px; }
body.dc-login #ipw .ipw-users { grid-template-columns: 1fr 1fr; max-height: 250px; gap: 8px; }
body.dc-login #ipw .ipw-u { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; justify-items: start; text-align: left; gap: 0 10px; padding: 9px 12px; }
body.dc-login #ipw .ipw-u .ipw-av { grid-row: 1 / 3; width: 38px; height: 38px; font-size: 16px; }
body.dc-login #ipw .ipw-u b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; align-self: end; }
body.dc-login #ipw .ipw-u small { align-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.dc-login #ipw .ipw-sel { margin-bottom: 8px; justify-content: flex-start; }
body.dc-login #ipw .ipw-sel .ipw-av { width: 40px; height: 40px; }
body.dc-login #ipw .ipw-pin { font-size: 21px; padding: 7px; }
body.dc-login #ipw .ipw-pad { gap: 6px; margin-top: 8px; }
body.dc-login #ipw .ipw-pad button { padding: 6px 0; font-size: 17px; min-height: 0; height: auto; }
body.dc-login #ipw .ipw-btn { margin-top: 10px; padding: 10px 14px; }
body.dc-login #ipw .ipw-link { margin-top: 8px; }
body.dc-login #ipw .ipw-err { margin-bottom: 8px; padding: 6px 10px; }

/* brand panel (left) */
.dc-band { grid-column: 1; grid-row: 1; position: relative; display: flex; flex-direction: column; min-height: 0; padding: 0 26px 20px; color: #fff; -webkit-user-select: none; user-select: none;
  background: radial-gradient(360px 300px at 0% 0%, color-mix(in srgb, var(--dc-acc) 34%, transparent), transparent 70%), linear-gradient(160deg, var(--dc-bg1), var(--dc-bg2)); }
.dc-band:after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 3px; background: linear-gradient(180deg, var(--dc-acc), var(--dc-acc2)); }
.dc-cap { height: 40px; display: flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--dc-acc); }
.dc-id { margin-top: auto; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dc-logo { flex: none; align-self: flex-start; }
.dc-logo .ipw-clogo, .dc-logo > img { width: 76px !important; height: 76px !important; margin: 0 !important; border-radius: 20px !important; box-shadow: 0 10px 26px rgba(0, 0, 0, .4) !important; border: 3px solid rgba(255, 255, 255, .9); background: #fff; display: block; }
.dc-t { min-width: 0; }
.dc-t b { display: block; font-size: 25px; font-weight: 800; line-height: 1.12; letter-spacing: -.3px; }
.dc-t span { display: block; font-size: 13px; color: rgba(255, 255, 255, .8); margin-top: 6px; line-height: 1.4; }
.dc-t em { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-width: 100%; width: fit-content; margin-top: 14px; padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-style: normal; font-size: 12.5px; font-weight: 600; line-height: 1.4; overflow: hidden; box-sizing: border-box; }
.dc-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: rgba(255, 255, 255, .62); }
.dc-foot b { color: #fff; font-weight: 600; }
.dc-drag { display: none; }

/* shop online-account box: one line until opened */
body.dc-login #dsShop { margin-top: 10px; }
body.dc-login .ds-shop:not(.on):not(.dc-open) > :not(b) { display: none !important; }
body.dc-login .ds-shop:not(.on) > b { cursor: pointer; display: block; text-align: center; font-size: 12.5px; color: var(--dc-acc2); text-decoration: underline; text-underline-offset: 3px; }
body.dc-login .ds-shop:not(.on) > b:before { content: "＋ Connect "; font-weight: 600; }
body.dc-login .ds-shop:not(.on).dc-open > b:before { content: "− "; }

/* the login window itself (frameless engine): the card fills it; the left panel and the strip above the right side move the window */
@media (max-width: 840px), (max-height: 560px) {
  body.dc-login #ipw .ipw-r { padding: 0; }
  body.dc-login #ipw .ipw-card { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
}
body.dc-fl .dc-band { -webkit-app-region: drag; }
body.dc-fl .dc-logo { -webkit-app-region: no-drag; }
body.dc-fl .dc-drag { display: block; position: absolute; top: 0; left: 300px; right: 140px; height: 36px; -webkit-app-region: drag; z-index: 2; }

/* ---------- full window: the app's top bar is the title bar ---------- */
body.dc-fl .shopbar, body.dc-fl.billing-full .cc-head, body.dc-fl.billing-full .pc-head { -webkit-app-region: drag; padding-right: 150px !important; }
body.dc-fl .shopbar :is(button, a, input, select, textarea, label, [role=button], [tabindex], .user-chip, #hkLic, .hk-lic),
body.dc-fl .cc-head :is(button, a, input, select, textarea, label, [role=button], [tabindex], .cc-tabs),
body.dc-fl .pc-head :is(button, a, input, select, textarea, label, [role=button], [tabindex]) { -webkit-app-region: no-drag; }
body.dc-fl .shopbar-t, body.dc-fl .cc-shop { -webkit-user-select: none; user-select: none; }
.dc-mbtn { margin-left: auto; order: 99; flex: none; width: 38px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.shopbar #hkLic ~ .dc-mbtn, .shopbar .hk-lic ~ .dc-mbtn { margin-left: 8px; }
.dc-mbtn:hover, .dc-mbtn:focus-visible { background: rgba(255, 255, 255, .18); outline: none; }
#dcMenu { position: fixed; z-index: 400; min-width: 270px; padding: 6px; background: #fff; color: #1f2937; border-radius: 12px; box-shadow: 0 18px 44px rgba(10, 20, 30, .28); border: 1px solid #e3e8ee; font-size: 13.5px; }
#dcMenu button { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
#dcMenu button:hover, #dcMenu button:focus { background: #eef4f0; outline: none; }
#dcMenu kbd { font: inherit; font-size: 11.5px; color: #8391a0; }
#dcMenu hr { border: 0; border-top: 1px solid #edf1f4; margin: 5px 4px; }

/* ---------- welcome card while the app opens (older engine) ---------- */
#dcSplash { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: linear-gradient(160deg, var(--dc-bg1), var(--dc-bg2)); transition: opacity .35s; }
#dcSplash.out { opacity: 0; pointer-events: none; }
#dcSplash .dc-sc { width: 560px; height: 300px; max-width: calc(100vw - 32px); display: grid; grid-template-columns: 190px 1fr; border-radius: 20px; overflow: hidden; color: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  background: radial-gradient(380px 260px at 0% 0%, color-mix(in srgb, var(--dc-acc) 34%, transparent), transparent 70%), linear-gradient(135deg, var(--dc-bg1), var(--dc-bg2)); }
#dcSplash .dc-si { display: grid; place-items: center; background: rgba(0, 0, 0, .18); border-right: 1px solid rgba(255, 255, 255, .08); }
#dcSplash .dc-si img { width: 112px; height: 112px; border-radius: 26px; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); background: #fff; }
#dcSplash .dc-st { padding: 34px 30px 22px; display: flex; flex-direction: column; min-width: 0; }
#dcSplash small { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--dc-acc); }
#dcSplash b { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 8px; letter-spacing: -.4px; }
#dcSplash span { font-size: 13.5px; color: rgba(255, 255, 255, .8); margin-top: 6px; }
#dcSplash em { font-style: normal; font-size: 13px; font-weight: 600; margin-top: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dcSplash .dc-bar { display: block; margin-top: auto; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
#dcSplash .dc-bar i { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--dc-acc), var(--dc-acc2)); animation: dcLoad 1.1s ease-in-out infinite; }
#dcSplash p { margin: 10px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
@keyframes dcLoad { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ---------- new engine offer ---------- */
#dcEngine { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 350; display: flex; align-items: center; gap: 10px; max-width: min(860px, calc(100vw - 24px));
  padding: 10px 12px 10px 16px; border-radius: 12px; background: #10241a; color: #fff; box-shadow: 0 14px 36px rgba(0, 0, 0, .35); font-size: 13px; line-height: 1.4; }
#dcEngine span { flex: 1; min-width: 0; }
#dcEngine .btn { white-space: nowrap; }

/* the program screen is drawn hidden and fades in once it has settled (desk-chrome.js busy()) */
html.dc-busy body { background: var(--dc-bg1) !important; }
html.dc-busy body > *:not(#dcSplash):not(.modal-bg):not(#toast) { opacity: 0 !important; }
html.dc-fade body > * { transition: opacity .28s ease; }
body.dc-fl .shopbar-logo, body.dc-fl .shopbar-t { -webkit-app-region: no-drag; }

/* Ali 22 Nov 2026: in the desktop program Windows draws – ▢ × over the top-right corner (the app's top bar is the title bar).
   Pop-up windows start under that bar, so their own × and title are never covered. --dc-cap = the bar's height (desk-chrome.js). */
body.dc-fl:not(.dc-login) :is(.dw-bg, .pw-bg, .modal-bg, .bk-pop) { padding-top: calc(var(--dc-cap, 40px) + 6px) !important; }
/* Ali 22 Nov 2026: after login the program is fixed - always full screen, it cannot be dragged away by its top bar, and no
   pop-up form can move it (Windows treated the top bar under a form's title as a drag handle). The login window can still move. */
body.dc-fl:not(.dc-login) .shopbar, body.dc-fl:not(.dc-login).billing-full .cc-head, body.dc-fl:not(.dc-login).billing-full .pc-head,
body.dc-fl:not(.dc-login) .dc-drag { -webkit-app-region: no-drag !important; }
body.dc-fl :is(.dw-bg, .pw-bg, .modal-bg, .bk-pop, .rv-bg), body.dc-fl :is(.dw-bg, .pw-bg, .modal-bg, .bk-pop, .rv-bg) * { -webkit-app-region: no-drag !important; }
