.sidebar { width: 250px; min-height: 100vh; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; flex: 0 0 250px; } main { min-width: 0; } }
.sidebar .nav-link { color: rgba(255,255,255,.75); border-radius: .375rem; padding: .45rem .75rem; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active { color: #fff; background: var(--bs-primary); }
.sidebar .nav-link i { width: 1.4rem; display: inline-block; }
.sidebar .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); padding: .9rem .75rem .3rem; }
.stat-card .value { font-size: 1.5rem; font-weight: 600; }
.stat-card .label { font-size: .8rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; }
.table td, .table th { vertical-align: middle; }
.op-choice input { display: none; }
.op-choice label { cursor: pointer; border: 2px solid var(--bs-border-color); border-radius: .5rem; padding: .6rem .9rem; display: block; text-align: center; }
.op-choice input:checked + label { border-color: var(--bs-primary); background: rgba(13,110,253,.08); font-weight: 600; }
pre.json { max-height: 420px; overflow: auto; background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: .5rem; font-size: .8rem; }
textarea.code { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
.chart-bar { background: var(--bs-primary); border-radius: 3px 3px 0 0; min-height: 2px; }


.pin-input { letter-spacing: .6em; font-weight: 600; }
.pin-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: none; align-items: center; justify-content: center; z-index: 1080; padding: 1rem; }
.pin-modal.show { display: flex; }
.pin-modal .pin-box { width: 100%; max-width: 380px; background: var(--bs-body-bg, #fff); border-radius: .75rem; }
main.flex-grow-1 { min-width: 0; } /* flex item: never grow wider than the screen because of a wide table */
pre { max-width: 100%; overflow-x: auto; }
#op-wrap.op-locked select { pointer-events: none; background-color: var(--bs-secondary-bg); }
.saved-chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.saved-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 0; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); border-radius: .8rem; padding: .35rem .7rem; font-size: .85rem; line-height: 1.2; color: var(--bs-body-color); }
.saved-chip small { color: var(--bs-secondary-color); font-size: .72rem; }
.saved-chip:hover, .saved-chip:focus { border-color: var(--bs-primary); }
.offer-strip { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .4rem; scroll-snap-type: x mandatory; }
.offer-card-mini { flex: none; width: 168px; scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; gap: .2rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); border-radius: 1rem; padding: .65rem .75rem; color: var(--bs-body-color); font-size: .85rem; }
.offer-card-mini .price { font-size: 1.15rem; font-weight: 700; color: var(--bs-primary); }
.offer-card-mini:hover { border-color: var(--bs-primary); box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), .15); }
.chat { display: flex; flex-direction: column; gap: .6rem; }
.chat-msg { max-width: 85%; padding: .7rem .9rem; border-radius: 1rem; background: var(--bs-body-bg); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.chat-msg.me { align-self: flex-end; background: rgba(var(--bs-primary-rgb), .1); border-bottom-right-radius: .3rem; }
.chat-msg.staff { align-self: flex-start; border-bottom-left-radius: .3rem; }
.chat-msg.admin-view.staff { align-self: flex-end; background: rgba(var(--bs-primary-rgb), .1); }
.chat-msg.admin-view.me { align-self: flex-start; background: var(--bs-body-bg); }
html[lang="bn"] body { font-family: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.lang-switch a { text-decoration: none; }

/* the hidden attribute always wins over Bootstrap display utilities (d-flex …) */
[hidden] { display: none !important; }

/* ---- user offers / packages ---- */
.op-logo { --op: #6f42c1; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--op); overflow: hidden; flex: none; }
.op-logo b { font-weight: 800; letter-spacing: -.02em; }
.op-logo img { width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.op-logo.lg { width: 68px; height: 68px; box-shadow: 0 0 0 7px rgba(255,255,255,.28); font-size: 1.35rem; }
.op-logo.xs { width: 20px; height: 20px; font-size: .55rem; box-shadow: inset 0 0 0 1.5px var(--op); }
.pk-filters { border: 0; border-radius: 1.1rem; overflow: hidden; box-shadow: 0 4px 18px rgba(15,23,42,.06); }
.pk-row { display: flex; flex-wrap: nowrap; gap: .45rem; align-items: center; padding: .6rem .75rem; overflow-x: auto; scrollbar-width: none; }
.pk-row::-webkit-scrollbar { display: none; }
.pk-row + .pk-row { border-top: 1px solid var(--bs-border-color-translucent); }
.pk-row[data-filter=op] { background: rgba(var(--app-primary-rgb), .04); }
.pk-row[data-filter=type] { background: rgba(25,135,84,.04); }
.pk-row[data-filter=sort] { background: rgba(111,66,193,.04); }
.pk-chip { --op: var(--app-primary); display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; border: 1.5px solid var(--bs-border-color); background: var(--bs-body-bg);
    color: var(--bs-body-color); border-radius: 2rem; padding: .3rem .85rem; font-size: .85rem; font-weight: 600; line-height: 1.4; transition: all .12s; }
.pk-chip.op { border-color: color-mix(in srgb, var(--op) 45%, transparent); color: var(--op); }
.pk-chip:hover { transform: translateY(-1px); }
.pk-chip.active { background: var(--app-gradient); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(var(--app-primary-rgb), .3); }
.pk-chip.active .op-logo { box-shadow: none; }
.pk-search { border-radius: 2rem; max-width: 420px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 1rem; }
.pk-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; border-radius: 1.4rem; padding: 1.1rem .9rem .9rem;
    background: linear-gradient(165deg, #ffb238 0%, #ff6a88 42%, #c13dd3 72%, #7b1fd1 100%); box-shadow: 0 10px 24px rgba(193,61,211,.25); transition: transform .15s, box-shadow .15s; }
.pk-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(193,61,211,.33); }
.pk-comm { position: absolute; top: .7rem; right: .7rem; background: rgba(0,0,0,.28); color: #7dffb3; font-weight: 700; font-size: .72rem; border-radius: 1rem; padding: .1rem .5rem; }
.pk-type { margin-top: .9rem; background: rgba(255,255,255,.25); border-radius: 1rem; padding: .05rem .6rem; font-size: .72rem; font-weight: 600; }
.pk-title { margin-top: .35rem; font-weight: 800; font-size: 1.12rem; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,.15); word-break: break-word; }
.pk-valid { font-size: .8rem; opacity: .92; margin-top: .25rem; }
.pk-details { font-size: .7rem; opacity: .8; margin-top: .25rem; }
.pk-price { margin-top: auto; padding-top: .9rem; font-weight: 800; font-size: 1.6rem; line-height: 1; }
.pk-price small { font-size: .8rem; font-weight: 600; margin-right: .1rem; }
.pk-buy { width: 100%; margin-top: .75rem; border: 0; border-radius: .9rem; background: #fff1e8; color: #7a2b00; font-weight: 700; padding: .55rem; transition: background .12s; }
.pk-buy:hover { background: #fff; }
.pk-buy:disabled { opacity: .6; }
@media (max-width: 575.98px) {
    .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .pk-card { padding: .9rem .6rem .7rem; border-radius: 1.1rem; }
    .op-logo.lg { width: 54px; height: 54px; font-size: 1.1rem; box-shadow: 0 0 0 5px rgba(255,255,255,.28); }
    .pk-title { font-size: .98rem; }
    .pk-price { font-size: 1.35rem; }
}

/* ---- scratch cards ---- */
.pk-card.sc-card { background: linear-gradient(165deg, #2dd4bf 0%, #0ea5e9 45%, #4f46e5 100%); box-shadow: 0 10px 24px rgba(14,165,233,.25); }
.pk-card.sc-card:hover { box-shadow: 0 16px 30px rgba(79,70,229,.33); }
.sc-stock { margin-top: .35rem; font-size: .72rem; font-weight: 600; background: rgba(255,255,255,.22); border-radius: 1rem; padding: .05rem .55rem; }
.sc-stock.out { background: rgba(0,0,0,.3); }
.pk-card.sc-card .pk-buy { background: #ecfeff; color: #164e63; }
.sc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.sc-ticket { position: relative; background: var(--bs-body-bg); border: 1.5px dashed rgba(var(--app-primary-rgb), .35); border-radius: 1rem; padding: .9rem 1rem; box-shadow: 0 4px 14px rgba(15,23,42,.05); }
.sc-ticket.is-new { border-style: solid; border-color: #198754; box-shadow: 0 6px 20px rgba(25,135,84,.18); }
.sc-head { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.sc-pin { margin: .6rem 0 .4rem; padding: .55rem .7rem; border-radius: .7rem; text-align: center; font: 700 1.35rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em;
    background: repeating-linear-gradient(135deg, rgba(var(--app-primary-rgb), .08) 0 8px, rgba(var(--app-primary-rgb), .14) 8px 16px); color: var(--bs-body-color); word-break: break-all; }
.sc-ticket.is-new .sc-pin, .sc-pin.shown { background: rgba(25,135,84,.08); }
.sc-meta { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .75rem; color: var(--bs-secondary-color); }
.sc-actions { display: flex; gap: .4rem; margin-top: .6rem; }
@media print {
    .no-print, .m-appbar, .m-tabbar, aside, nav, header, .app-sidebar, .pwa-banner { display: none !important; }
    .sc-list { grid-template-columns: repeat(2, 1fr); }
    .sc-ticket { break-inside: avoid; box-shadow: none; border: 1.5px dashed #000; }
}

/* ---- sign-up account types ---- */
.signup-plans { display: grid; gap: .5rem; }
.signup-plan { display: block; border: 1.5px solid var(--bs-border-color); border-radius: .9rem; padding: .6rem .8rem .6rem 2.2rem; position: relative; cursor: pointer; }
.signup-plan input { position: absolute; left: .8rem; top: .85rem; }
.signup-plan:has(input:checked) { border-color: var(--app-primary); background: rgba(var(--app-primary-rgb), .06); }
@media print {
    .statement { border: 0 !important; box-shadow: none !important; }
    body { background: #fff !important; }
    main, .app-content, .container-fluid { padding: 0 !important; margin: 0 !important; }
}
.legend-box { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; vertical-align: -1px; }

/* messages on a transaction (user ⇄ team) */
.tx-chat { display: flex; flex-direction: column; gap: .5rem; max-height: 420px; overflow-y: auto; }
.tx-msg { max-width: 85%; }
.tx-msg.me { align-self: flex-end; text-align: right; }
.tx-msg .bubble { display: inline-block; padding: .5rem .75rem; border-radius: 1rem; background: var(--bs-tertiary-bg); text-align: left; white-space: normal; word-break: break-word; }
.tx-msg.me .bubble { background: var(--bs-primary); color: #fff; border-bottom-right-radius: .3rem; }
.tx-msg.them .bubble { border-bottom-left-radius: .3rem; }
.tx-msg .meta { font-size: .7rem; color: var(--bs-secondary-color); margin-top: .15rem; }
.mq-timer { background: var(--bs-secondary-bg); color: var(--bs-body-color); font-variant-numeric: tabular-nums; }
.mq-timer.warn { background: #fef3c7; color: #92400e; }
.mq-timer.late { background: #fee2e2; color: #b91c1c; }
.delivered-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: .04em; word-break: break-all; }
.m-tile-ico { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; color: #fff; flex: none; }
.m-tile-ico.c1 { background: linear-gradient(135deg, #3b82f6, #6366f1); } .m-tile-ico.c2 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.m-tile-ico.c3 { background: linear-gradient(135deg, #10b981, #059669); } .m-tile-ico.c4 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.m-tile-ico.c5 { background: linear-gradient(135deg, #8b5cf6, #d946ef); } .m-tile-ico.c6 { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }
.m-tile-ico.c7 { background: linear-gradient(135deg, #64748b, #334155); } .m-tile-ico.c8 { background: var(--app-gradient); }
.cs-packages { display: grid; gap: .5rem; }
.cs-pkg { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 2px solid var(--bs-border-color); border-radius: .9rem; cursor: pointer; background: var(--bs-body-bg); }
.cs-pkg input { accent-color: var(--bs-primary); width: 1.1rem; height: 1.1rem; flex: none; }
.cs-pkg-body { flex: 1; min-width: 0; }
.cs-pkg-price { font-weight: 700; text-align: right; white-space: nowrap; }
.cs-pkg:has(input:checked) { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .06); }

/* trial licence ribbon (licence server trial) */
.trial-ribbon { position: fixed; right: 12px; bottom: 12px; z-index: 1030; background: #0ea5e9; color: #fff; font-size: .75rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; box-shadow: 0 4px 14px rgba(14, 165, 233, .35); pointer-events: none; }
@media (max-width: 991.98px) { .trial-ribbon { bottom: calc(80px + env(safe-area-inset-bottom)); } }
