/* T-Store: shared visual system for every inventory view and its dialogs.
   Screen-only rules leave document printing with the existing print layouts. */
@media screen {
  #tStorePage, #tStoreModalBg {
    --store-accent: #c51c63;
    --store-tint: #fff1f6;
    --store-ink: #263247;
    --store-muted: #68758a;
    --store-line: #e7eaf0;
    color: var(--store-ink);
    font-family: inherit;
  }
  #tStorePage { background: #f5f6fa; min-height: 100%; padding: 0; }
  #tStorePage .tgo31-shell.tstore-fullpage { padding: 28px 30px 40px; max-width: 1800px; }
  #tStorePage *, #tStoreModalBg * { box-sizing: border-box; }
  #tStorePage .tgo31-header { align-items: center; gap: 20px; margin-bottom: 24px; }
  #tStorePage .tstore-eyebrow { color: var(--store-accent); font-size: 10px; font-weight: 800; letter-spacing: 1.8px; margin-bottom: 8px; }
  #tStorePage .tgo31-title { color: var(--store-ink); font-size: 32px; font-weight: 800; letter-spacing: -.8px; line-height: 1.3; }
  #tStorePage .tgo31-header-logo { width: 42px; height: 42px; border-radius: 12px; }
  #tStorePage .tgo31-sub { color: var(--store-muted); font-size: 13px; margin-top: 7px; }
  #tStorePage .tstore-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
  #tStorePage .tgo31-card { border: 1px solid var(--store-line); border-radius: 18px; padding: 22px; box-shadow: 0 3px 14px #25324a04; min-width: 0; }
  #tStorePage .tstore-summary { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
  #tStorePage .tgo31-stat { position: relative; padding: 21px; overflow: hidden; }
  #tStorePage .tgo31-stat > span { font-size: 12px; color: var(--store-muted); font-weight: 600; padding-right: 38px; }
  #tStorePage .tgo31-stat > b { font-size: clamp(23px,2.2vw,32px); font-weight: 750; letter-spacing: -.7px; margin: 12px 0 5px; color: var(--store-ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  #tStorePage .tgo31-stat > small { font-size: 11px; color: var(--store-muted); }
  #tStorePage .tstore-stat-icon { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--store-accent); background: var(--store-tint); }
  #tStorePage .tstore-stat-warning .tstore-stat-icon { color: #a96909; background: #fff6e4; }
  #tStorePage .tstore-stat-warning > b { color: #a96909; }
  #tStorePage .tstore-icon { width: 19px; height: 19px; flex: 0 0 auto; }
  #tStorePage .tstore-tabs { display: flex; gap: 5px; padding: 7px; margin: 0 0 22px; border: 1px solid var(--store-line); border-radius: 15px; background: #fff; overflow-x: auto; }
  #tStorePage .tstore-tabs .tgo31-btn { flex: 1 0 auto; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-color: transparent; background: transparent; color: var(--store-muted); box-shadow: none; min-height: 43px; white-space: nowrap; }
  #tStorePage .tstore-tabs .tgo31-btn.primary { color: var(--store-accent); background: var(--store-tint); border-color: #f8dbe7; }
  #tStorePage .tstore-tabs .tgo31-btn.primary:hover:not(:disabled) { background: #fce4ee; border-color: #f4c7d9; }
  #tStorePage .tstore-tabs .tgo31-btn.primary:hover:not(:disabled) { background: #fce4ee; border-color: #f4c7d9; }
  #tStorePage .tstore-section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
  #tStorePage h3 { color: var(--store-ink); font-size: 18px; font-weight: 750; line-height: 1.5; }
  #tStorePage .tstore-section-head h3 { margin: 0; }
  #tStorePage .tstore-section-head p { margin: 4px 0 0; font-size: 12px; color: var(--store-muted); }
  #tStorePage .tstore-count { border: 1px solid var(--store-line); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--store-muted); white-space: nowrap; background: #f8f9fc; }
  #tStorePage .tgo31-toolbar { gap: 10px; margin-bottom: 14px; }
  #tStorePage :is(.tgo31-input,.tgo31-select,.tgo31-textarea),
  #tStoreModalBg :is(.tgo31-input,.tgo31-select,.tgo31-textarea) { font-family: inherit; font-size: 13px; line-height: 1.5; min-height: 42px; border: 1px solid #dce1e9; border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--store-ink); max-width: 100%; transition: border-color .15s,box-shadow .15s; }
  #tStorePage input::placeholder, #tStoreModalBg input::placeholder { color: #8590a2; }
  #tStorePage :is(input,select,textarea):focus, #tStoreModalBg :is(input,select,textarea):focus { border-color: var(--store-accent); outline: 0; box-shadow: 0 0 0 3px #c51c6314; }
  #tStorePage .tgo31-btn, #tStoreModalBg .tgo31-btn { font-family: inherit; font-size: 12px; line-height: 1.5; font-weight: 650; border: 1px solid #dce1e9; border-radius: 10px; min-height: 38px; padding: 9px 13px; color: #465269; background: #fff; transition: background .15s,border-color .15s,box-shadow .15s; }
  #tStorePage .tgo31-btn:hover:not(:disabled), #tStoreModalBg .tgo31-btn:hover:not(:disabled) { background: #f8f9fc; border-color: #b7c1d0; }
  #tStorePage .tgo31-btn.primary, #tStoreModalBg .tgo31-btn.primary { background: var(--store-accent); border-color: var(--store-accent); color: #fff; box-shadow: 0 3px 8px #c51c6318; }
  #tStorePage .tgo31-btn.primary:hover:not(:disabled), #tStoreModalBg .tgo31-btn.primary:hover:not(:disabled) { background: #aa1553; border-color: #aa1553; }
  #tStorePage .tgo31-btn.success { background: #16805b; border-color: #16805b; color: #fff; }
  #tStorePage .tgo31-btn.info { background: #2563eb; border-color: #2563eb; color: #fff; }
  #tStorePage .tgo31-btn.danger, #tStoreModalBg .tgo31-btn.danger { background: #fff5f5; border-color: #f2cece; color: #b42332; }
  #tStorePage .tgo31-btn.success:hover:not(:disabled) { background: #116749; }
  #tStorePage .tgo31-btn.info:hover:not(:disabled) { background: #1d4ed8; }
  #tStorePage .tgo31-btn.danger:hover:not(:disabled), #tStoreModalBg .tgo31-btn.danger:hover:not(:disabled) { background: #ffe7e7; }
  #tStorePage button:focus-visible, #tStoreModalBg button:focus-visible { outline: 3px solid #c51c6380; outline-offset: 3px; }
  #tStorePage .tgo31-table { min-width: 820px; font-size: 13px; line-height: 1.65; }
  #tStorePage .tgo31-table th { color: #6b7688; background: #f7f8fb; font-size: 11px; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--store-line); white-space: nowrap; }
  #tStorePage .tgo31-table td { padding: 15px 14px; vertical-align: middle; border-bottom: 1px solid #eef0f5; color: var(--store-ink); }
  #tStorePage .tgo31-table tbody tr:hover { background: #fffafd; }
  #tStorePage .tgo31-table tbody tr:last-child td { border-bottom: 0; }
  #tStorePage .tgo31-table :is(th,td).r { font-variant-numeric: tabular-nums; }
  #tStorePage .tgo31-table td:last-child .tgo31-btn { padding: 6px 9px; min-height: 32px; margin: 2px 0; white-space: nowrap; font-size: 11px; }
  #tStorePage .tgo31-badge { font-size: 11px; font-weight: 650; padding: 4px 9px; gap: 5px; white-space: nowrap; }
  #tStorePage .tgo31-badge.green { color: #157354; background: #e8f7f0; }
  #tStorePage .tgo31-badge.red { color: #b42332; background: #fff0f1; }
  #tStorePage .tgo31-badge.amber { color: #946509; background: #fff5dd; }
  #tStorePage .tgo31-empty { padding: 42px 20px; background: #fafbfe; border: 1px dashed #d8deea; color: var(--store-muted); line-height: 1.8; }
  #tStorePage .tgo-prr-head { gap: 16px; margin-bottom: 20px; }
  #tStorePage .tgo-prr-editor-grid { gap: 16px; }
  #tStorePage .tgo31-field label, #tStoreModalBg .tgo31-field label { font-size: 12px; font-weight: 650; color: #536078; margin-bottom: 7px; }
  #tStorePage .tgo-prr-step { gap: 8px; margin: 16px 0; }
  #tStorePage .tgo-prr-step span { font-weight: 600; padding: 7px 12px; border-color: var(--store-line); }
  #tStorePage .tgo-prr-step span.on { background: var(--store-tint); color: var(--store-accent); border-color: #f4c7d9; }
  #tStorePage :is(.tgo-prr-ref-card,.tgo-report-note,.tgo-pos-right) { background: #f8f9fc; border-color: var(--store-line); border-radius: 14px; padding: 16px; }
  #tStorePage .tgo-prr-ref-search .tgo31-input { min-width: min(260px,100%); }
  #tStorePage .tgo-prr-ref-results { border-color: var(--store-line); }
  #tStorePage .tgo-report-tabs .tgo31-btn { border-radius: 9px; }
  #tStorePage .tgo-prr-pager button.on { background: var(--store-accent); border-color: var(--store-accent); color: #fff; }
  #tStorePage .tgo-pos-card { padding: 16px; border-color: var(--store-line); border-radius: 14px; min-height: 125px; }
  #tStorePage .tgo-pos-card:hover { border-color: var(--store-accent); box-shadow: 0 5px 16px #c51c6310; }
  #tStorePage .tgo-pos-card.inbill { border-color: var(--store-accent); background: #fff9fc; }
  #tStorePage .tgo-pos-chip.on, #tStorePage .tgo-pos-qb { background: var(--store-accent); border-color: var(--store-accent); }
  #tStorePage .tgo-pos-nm { font-size: 13px; line-height: 1.6; }
  #tStorePage .tgo-pos-sku { font-size: 11px; color: var(--store-muted); }
  #tStorePage .tgo-pos-selhead { color: var(--store-ink); }
  #tStoreModalBg { background: #1c263b80; backdrop-filter: blur(5px); }
  #tStoreModalBg .tgo31-modal { border-radius: 20px; box-shadow: 0 24px 90px #11182740; }
  #tStoreModalBg .tgo31-modal-h { padding: 20px 24px; border-color: var(--store-line); font-size: 18px; }
  #tStoreModalBg .tgo31-modal-b { padding: 24px; }
  #tStoreModalBg .tgo31-form { gap: 18px; }
  #tStoreModalBg .tgo31-modal-f { padding: 16px 24px; border-color: var(--store-line); background: #fafbfe; flex-wrap: wrap; }
  #tStoreModalBg .tgo31-x { width: 36px; height: 36px; border-radius: 10px; background: #f5f6fa; }
  #tStoreModalBg input[type=checkbox] { min-height: auto; accent-color: var(--store-accent); }
  body.tstore-theme #tgoCatMgrBg { backdrop-filter: blur(5px); }
  body.tstore-theme #tgoCatMgrBox { border-radius: 20px !important; color: #263247; }
  body.tstore-theme #tgoCatMgrBox table { min-width: 700px; }
  body.tstore-theme #tgoCatMgrBox :is(input,select) { border-radius: 9px !important; min-height: 38px; }
  body.tstore-theme #tgoCatMgrBox .tgo31-btn { border-radius: 10px; }
  body.tstore-theme #tgoCatMgrBox .tgo31-btn.primary { background: #c51c63; border-color: #c51c63; color: #fff; }
}
@media screen and (max-width: 1200px) {
  #tStorePage .tstore-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #tStorePage .tgo31-shell.tstore-fullpage { padding: 22px; }
}
@media screen and (max-width: 760px) {
  #tStorePage .tgo31-shell.tstore-fullpage { padding: 18px 12px 28px; }
  #tStorePage .tgo31-header { flex-direction: column; align-items: stretch; }
  #tStorePage .tstore-header-actions .tgo31-btn { flex: 1; }
  #tStorePage .tstore-header-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  #tStorePage .tstore-header-actions .tgo31-btn.primary { grid-column: 1 / -1; }
  #tStorePage .tgo31-card { padding: 16px; border-radius: 14px; }
  #tStorePage .tstore-summary { gap: 10px; }
  #tStorePage .tgo31-stat { padding: 16px; }
  #tStorePage .tgo31-stat > span { padding-right: 0; margin-top: 40px; }
  #tStorePage .tgo31-stat > b { font-size: 22px; }
  #tStorePage .tstore-stat-icon { top: 12px; left: 14px; right: auto; }
  #tStorePage .tstore-tabs { margin-bottom: 16px; }
  #tStorePage .tgo31-toolbar > :is(input,select) { min-width: 0 !important; }
  #tStorePage .tgo31-toolbar > input:first-child { flex-basis: 100% !important; }
  #tStorePage .tgo-prr-head { flex-direction: column; }
  #tStorePage .tgo-prr-editor-grid, #tStorePage .tgo-pos-top { grid-template-columns: 1fr; }
  #tStorePage .tgo-report-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #tStorePage .tgo-prr-actions { justify-content: flex-start; }
  #tStoreModalBg { padding: 10px; }
  #tStoreModalBg .tgo31-modal { max-height: 94dvh; }
  #tStoreModalBg :is(.tgo31-modal-h,.tgo31-modal-b,.tgo31-modal-f) { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #tStorePage *, #tStoreModalBg * { transition: none !important; }
}
@media print {
  #tStorePage .tstore-tabs { display: none !important; }
}
