.pt-shell { max-width: 1540px; margin: 0 auto; }
.pt-command { display: grid; grid-template-columns: auto minmax(320px,720px); align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 18px; }
.pt-command > div span,.pt-picker header small,.pt-queue header span,.pt-preview-dialog header span { display: block; color: #f42537; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pt-command h2 { margin: 3px 0 0; font-size: 32px; }
.pt-command label { position: relative; }
.pt-command input { width: 100%; height: 56px; border: 1px solid #d9dde4; border-radius: 12px; background: #fff; padding: 0 70px 0 18px; font: inherit; outline: 0; }
.pt-command input:focus { border-color: #f42537; box-shadow: 0 0 0 3px #f4253715; }
.pt-command kbd { position: absolute; right: 13px; top: 14px; border: 1px solid #d9dde4; border-radius: 7px; padding: 5px 8px; background: #f5f6f8; color: #70798a; }
.pt-layout { display: grid; grid-template-columns: minmax(0,1fr) 430px; gap: 18px; align-items: start; }
.pt-picker,.pt-queue { background: #fff; border: 1px solid #dfe3e9; border-radius: 16px; box-shadow: 0 16px 40px #1620330a; overflow: hidden; }
.pt-picker > header,.pt-queue > header { display: flex; align-items: center; gap: 16px; min-height: 82px; padding: 16px 20px; border-bottom: 1px solid #e5e8ed; }
.pt-picker > header button,.pt-queue > header button { border: 1px solid #d9dde4; border-radius: 9px; background: #fff; padding: 10px 14px; }
.pt-picker h3 { margin: 3px 0 0; font-size: 24px; }
.pt-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 18px; }
.pt-grid.is-variants { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pt-choice { position: relative; display: flex; align-items: center; gap: 14px; min-height: 92px; border: 1px solid #dfe3e9; border-radius: 13px; background: #fff; padding: 14px; text-align: left; cursor: pointer; transition: border-color .15s,box-shadow .15s,transform .15s; }
.pt-choice:hover { border-color: #f42537; box-shadow: 0 8px 24px #f4253712; transform: translateY(-1px); }
.pt-choice img { width: 66px; height: 66px; object-fit: contain; border-radius: 10px; background: #f6f7f9; }
.pt-choice span { min-width: 0; display: grid; gap: 5px; }
.pt-choice b { font-size: 16px; line-height: 1.15; }
.pt-choice small { color: #7d8594; line-height: 1.25; }
.pt-choice kbd { margin-left: auto; align-self: flex-start; border: 1px solid #d9dde4; border-radius: 7px; background: #f5f6f8; padding: 5px 8px; }
.pt-queue { position: sticky; top: 18px; }
.pt-queue > header { justify-content: space-between; }
.pt-queue > header > div { display: flex; align-items: center; gap: 10px; }
.pt-queue > header b { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 9px; background: #171a20; color: #fff; }
.pt-queue-list { max-height: 560px; overflow: auto; }
.pt-queue article { position: relative; display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 14px 42px 14px 16px; border-bottom: 1px solid #eceef2; }
.pt-queue article > img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #f6f7f9; }
.pt-queue article > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.pt-queue article b { font-size: 13px; }
.pt-queue article small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #818999; }
.pt-queue article code { font-size: 11px; color: #424956; }
.pt-copies { display: flex; align-items: center; gap: 7px; }
.pt-copies button,.pt-remove { border: 1px solid #d9dde4; background: #fff; border-radius: 7px; width: 28px; height: 28px; }
.pt-remove { position: absolute; right: 8px; top: 8px; }
.pt-queue > footer { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; padding: 16px; border-top: 1px solid #e5e8ed; }
.pt-print-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.pt-print-options label { min-width: 0; display: grid; gap: 6px; }
.pt-print-options span { color: #7b8492; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pt-print-options select { width: 100%; min-width: 0; height: 48px; border: 1px solid #d9dde4; border-radius: 10px; background: #fff; padding: 0 34px 0 10px; font: inherit; font-weight: 700; }
.pt-queue > footer > button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; border: 0; border-radius: 10px; background: #f42537; color: #fff; font: inherit; font-weight: 800; }
.pt-queue > footer > button:disabled { opacity: .4; }
.pt-queue > footer kbd,.pt-preview-dialog footer kbd { border-radius: 6px; background: #c91e2c; padding: 4px 7px; color: #fff; font: 700 11px/1 system-ui,sans-serif; }
.pt-empty { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 200px; padding: 30px; color: #8991a0; text-align: center; }
.pt-empty b { color: #303641; font-size: 17px; }

.pt-preview-dialog { width: min(1120px,calc(calc(100vw / var(--crm-ui-scale, 1)) - 40px)); height: min(860px,calc(calc(100vh / var(--crm-ui-scale, 1)) - 40px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 28px 90px #11182752; overflow: hidden; }
.pt-preview-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.pt-preview-dialog::backdrop { background: #111827a8; backdrop-filter: blur(5px); }
.pt-preview-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid #e3e6eb; }
.pt-preview-dialog h3 { margin: 3px 0 0; font-size: 24px; }
.pt-preview-dialog > header button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #d9dde4; border-radius: 10px; background: #fff; font-size: 23px; }
.pt-preview-stage { min-height: 0; overflow: hidden; background: #e9ecf1; }
.pt-preview-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #e9ecf1; }
.pt-preview-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 22px; border-top: 1px solid #e3e6eb; }
.pt-preview-dialog > footer p { margin: 0; color: #737c8c; }
.pt-preview-dialog > footer button { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 220px; height: 50px; border: 0; border-radius: 10px; background: #f42537; color: #fff; font: inherit; font-weight: 800; }

@media (max-width:1100px) {
  .pt-layout { grid-template-columns: 1fr; }
  .pt-queue { position: static; }
  .pt-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
  .pt-command { grid-template-columns: 1fr; }
  .pt-grid,.pt-grid.is-variants { grid-template-columns: 1fr; }
  .pt-layout { display: block; }
  .pt-picker { margin-bottom: 14px; }
  .pt-print-options { grid-template-columns: 1fr; }
  .pt-preview-dialog { width: calc(100vw / var(--crm-ui-scale, 1)); height: calc(100vh / var(--crm-ui-scale, 1)); border-radius: 0; }
  .pt-preview-dialog > footer { align-items: stretch; flex-direction: column; }
  .pt-preview-dialog > footer button { width: 100%; }
}
