/* Mobile / PWA records-first desk. Desktop two-column layout is unchanged. */

body:not(.pawn-mdesk) .pawn-mdesk-sticky,
body:not(.pawn-mdesk) .pawn-mdesk-below-save {
  display: none !important;
}

body.pawn-mdesk,
html:has(body.pawn-mdesk) {
  background: #eef2f6 !important;
}

body.pawn-mdesk .pawn-op-header {
  display: none !important;
}

body.pawn-mdesk .page {
  padding: 0 12px 28px !important;
  max-width: none !important;
}

body.pawn-mdesk.v1-pwa-bottom-nav-active .page {
  padding-bottom: 96px !important;
}

body.pawn-mdesk .pawn-main-split {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

body.pawn-mdesk--records .pawn-left-col,
body.pawn-mdesk--create .pawn-right-col {
  display: none !important;
}

body.pawn-mdesk .pawn-module-frame {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible !important;
}

body.pawn-mdesk .pawn-module-frame-records > .list-card#block5 {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.pawn-mdesk .v1-global-bar {
  background: #eef2f6 !important;
  border-bottom: 0 !important;
}

body.pawn-mdesk .v1-global-bar-inner {
  padding: 8px 12px !important;
}

body.pawn-mdesk .pawn-mdesk-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 4px 0 12px;
  background: #eef2f6;
}

body.pawn-mdesk--records .pawn-mdesk-sticky::before {
  content: "Tickets";
  flex: 1 1 auto;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0f172a;
  line-height: 1.2;
}

body.pawn-mdesk--create .pawn-mdesk-sticky::before {
  content: "New ticket";
  flex: 1 1 auto;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

body.pawn-mdesk .pawn-mdesk-btn,
body.pawn-mdesk .pawn-mdesk-below-save {
  display: none;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font: 700 0.8125rem/1.25 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
}

body.pawn-mdesk .pawn-mdesk-btn--primary {
  background: #0f3d52;
  border-color: #0f3d52;
  color: #fff;
}

body.pawn-mdesk--records .pawn-mdesk-btn[data-mdesk="create"] {
  display: block;
}

body.pawn-mdesk--create .pawn-mdesk-btn[data-mdesk="records"],
body.pawn-mdesk--create .pawn-mdesk-below-save {
  display: block;
}

body.pawn-mdesk--create .pawn-mdesk-btn[data-mdesk="records"] {
  background: #fff;
  border-color: #d5dee7;
  color: #334155;
}

body.pawn-mdesk--records .pawn-records-title-row h2 {
  display: none;
}

body.pawn-mdesk .pawn-records-title-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
  padding: 0;
}

body.pawn-mdesk #pawn-records-refresh {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  color: #64748b;
  background: transparent;
  border: 0;
}

body.pawn-mdesk .pawn-dash {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

body.pawn-mdesk .pawn-dash__cell,
body.pawn-mdesk .pawn-dash__cell + .pawn-dash__cell {
  flex: 0 0 auto;
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

body.pawn-mdesk .pawn-dash__head {
  font-size: 0.625rem;
  color: #94a3b8;
}

body.pawn-mdesk .pawn-dash__v {
  font-size: 0.9375rem;
}

body.pawn-mdesk .pawn-dash__cell--overdue {
  border-color: #fecaca;
  background: #fff7f7;
}

body.pawn-mdesk #block5 .tools-search #q,
body.pawn-mdesk #q {
  min-height: 46px;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #dbe3ea;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
}

body.pawn-mdesk #block5 .tools-search #q:focus {
  outline: none;
  border-color: #175e7d;
}

body.pawn-mdesk .pawn-records-toolbar {
  margin-bottom: 12px;
}

body.pawn-mdesk #block5 .pawn-rec-chip {
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: #475569;
}

body.pawn-mdesk #block5 .pawn-rec-chip.is-on {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

body.pawn-mdesk #block5 .pawn-rec-chip--calendar {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

body.pawn-mdesk #block5 .pawn-rec-chip--calendar.is-on {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

body.pawn-mdesk #block5 .list.pawn-summary-list {
  overflow: visible;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row.header {
  display: none !important;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row:not(.header) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "ticket amount"
    "cust cust"
    "due note" !important;
  gap: 2px 12px !important;
  align-items: start !important;
  margin: 0 0 8px !important;
  padding: 13px 14px !important;
  background: #fff !important;
  border: 1px solid #e5ebf1 !important;
  border-radius: 16px !important;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row:not(.header) > div {
  white-space: nowrap;
  font-size: 0.8125rem;
  color: #475569;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row:not(.header) > div:nth-child(1) {
  grid-area: ticket;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row:not(.header) > div:nth-child(2) {
  grid-area: due;
  font-size: 0.75rem;
  color: #64748b;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row:not(.header) > div:nth-child(3) {
  grid-area: amount;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f3d52;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row:not(.header) > div:nth-child(4) {
  grid-area: cust;
  font-size: 0.8125rem;
  color: #334155;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row:not(.header) > div:nth-child(5) {
  grid-area: note;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: right;
}

body.pawn-mdesk #block5 .list.pawn-summary-list .row.pawn-records-row--just-saved {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
  box-shadow: none;
}

body.pawn-mdesk .pawn-list-empty {
  border: 0;
  background: #fff;
  border-radius: 16px;
  padding: 28px 16px;
}

body.pawn-mdesk--create .pawn-split-col-title {
  display: none;
}

body.pawn-mdesk--create .pawn-frame-stack {
  gap: 10px;
}

body.pawn-mdesk--create .pawn-left-col .card {
  margin: 0;
  padding: 14px 14px 12px;
  border: 1px solid #e5ebf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

body.pawn-mdesk--create .pawn-card-title {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.pawn-save-only-spacer {
  pointer-events: none;
}

.pawn-save-only.pawn-save-dock {
  z-index: 60;
  margin: 0;
  padding: 10px 16px 12px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
}

body:not(.pawn-mdesk) .pawn-save-only.pawn-save-dock #btn-save {
  min-height: 2.5rem;
  min-width: 5.5rem;
  font-size: 0.875rem;
}

body.pawn-mdesk--create .pawn-save-only {
  z-index: 60;
  margin: 8px 0 0;
  padding: 12px 12px 8px;
  background: #eef2f6;
}

body.pawn-mdesk--create .pawn-save-only.pawn-save-dock {
  margin: 0;
  background: #eef2f6;
  border-top-color: #dbe3ea;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
}

body.pawn-mdesk--create #btn-save {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 700;
}

body.pawn-mdesk .pawn-mdesk-below-save {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border-color: transparent;
  color: #64748b;
}

body.pawn-mdesk .pawn-records-pagination {
  padding-bottom: 12px;
}
