/* Калькулятор печати / копицентра */
.pc-section { padding-top: 0.5rem; }
.pc-shell {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(10, 10, 10, 0.07);
  border: 1px solid rgba(10, 10, 10, 0.06);
  padding: 1.25rem 1.2rem 1.4rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.25rem;
}
@media (max-width: 860px) {
  .pc-shell { grid-template-columns: 1fr; }
}
.pc-loading { color: #666; grid-column: 1 / -1; }
.pc-form { display: flex; flex-direction: column; gap: 0.85rem; }
.pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .pc-grid { grid-template-columns: 1fr; }
}
.pc-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.28rem;
}
.pc-field select,
.pc-field input[type="number"],
.pc-field input[type="text"],
.pc-field input[type="email"],
.pc-field input[type="tel"],
.pc-field input[type="date"],
.pc-field textarea {
  width: 100%;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: #fff;
}
.pc-field select:focus,
.pc-field input:focus,
.pc-field textarea:focus {
  outline: 2px solid rgba(255, 204, 0, 0.55);
  border-color: #ffcc00;
}
.pc-upload {
  border: 1.5px dashed rgba(10, 10, 10, 0.18);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(180deg, #fffef8 0%, #f7f4ea 100%);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pc-upload:hover,
.pc-upload.is-drag {
  border-color: #ffcc00;
  background: #fffceb;
}
.pc-upload strong { display: block; margin-bottom: 0.25rem; }
.pc-upload span { color: #666; font-size: 0.88rem; }
.pc-upload input { display: none; }
.pc-files { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.55rem; }
.pc-file {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
}
.pc-file-main {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  flex: 1;
}
.pc-file-name { font-weight: 600; word-break: break-word; }
.pc-file-stats { color: #666; font-size: 0.82rem; }
.pc-pages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
@media (max-width: 560px) {
  .pc-pages { grid-template-columns: 1fr; }
}
.pc-pages .pc-field { margin: 0; }
.pc-pages input[readonly] {
  background: #f6f6f4;
  color: #333;
}
.pc-pages-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.35;
}
.pc-file-range {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #444;
}
.pc-file-range input {
  width: 100%;
  max-width: 16rem;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-weight: 400;
  background: #fff;
}
.pc-file-range input:focus {
  outline: 2px solid rgba(255, 204, 0, 0.55);
  border-color: #ffcc00;
}
.pc-file button {
  border: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.pc-approve {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  background: #fffceb;
  border: 1px solid rgba(255, 204, 0, 0.45);
  border-radius: 12px;
}
.pc-approve-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.35;
}
.pc-approve-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.pc-approve-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.35;
}
.pc-actions .btn-ghost {
  background: transparent;
  border: 1px solid rgba(10, 10, 10, 0.14);
  color: #333;
}
.pc-actions .btn-ghost:hover {
  border-color: #ffcc00;
  background: #fffceb;
}
.pc-msg a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}
.pc-pages .pc-field { margin: 0; }
.pc-side {
  background: #fafafa;
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(10, 10, 10, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-self: start;
  position: sticky;
  top: 1rem;
}
.pc-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.pc-price-row span { color: #666; font-size: 0.9rem; }
.pc-pill {
  display: inline-flex;
  align-items: center;
  background: #ffcc00;
  color: #111;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.pc-pill--lg { font-size: 1.35rem; padding: 0.5rem 1rem; }
.pc-meta { font-size: 0.82rem; color: #777; line-height: 1.4; }
.pc-order-fields { display: flex; flex-direction: column; gap: 0.55rem; }
.pc-order-fields--client {
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: linear-gradient(165deg, #fffef6 0%, #fff8d6 100%);
  border: 1px solid rgba(255, 204, 0, 0.45);
}
.pc-client-hello {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.pc-client-ava {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #ffe566, #ffcc00) center/cover no-repeat;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.08);
}
.pc-client-hello-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.pc-client-hello-text strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #111;
  line-height: 1.25;
}
.pc-client-meta {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-client-lk {
  font-size: 0.8rem;
  font-weight: 600;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
  width: fit-content;
}
.pc-client-lk:hover { color: #000; }
.pc-actions { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.25rem; }
.pc-actions .btn { width: 100%; justify-content: center; }
.pc-yk-hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.35;
}
.pc-calc-only {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #f7f7f5;
  color: #555;
  font-size: 0.88rem;
  line-height: 1.4;
}
.pc-addons {
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(180deg, #fffef8 0%, #faf8f2 100%);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pc-addons-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #333;
}
.pc-addon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.pc-addon-row select {
  flex: 1 1 12rem;
  min-width: 10rem;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  background: #fff;
}
.pc-addon-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.pc-addon-check input { width: 1rem; height: 1rem; }
.pc-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #444;
  min-width: 4.5rem;
}
.pc-msg {
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
}
.pc-msg.is-err { background: #fff1f1; color: #a30; }
.pc-msg.is-ok { background: #eefaf0; color: #176b2a; }
.pc-msg.is-info { background: #fff8e0; color: #5a4a00; }
.pc-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pc-seg button {
  border: 1px solid rgba(10, 10, 10, 0.12);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}
.pc-seg button.is-on {
  background: #ffcc00;
  border-color: #ffcc00;
  font-weight: 700;
}

/* Контакты под зелёным блоком */
.pc-form > .pc-order-fields {
  margin-top: 0.15rem;
  padding-top: 0.15rem;
}
.pc-form > .pc-msg + .pc-order-fields {
  margin-top: 0.35rem;
}

/* Реалтайм-предпросмотр страниц */
.pc-preview {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f2 100%);
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 14px;
  padding: 0.7rem 0.7rem 0.75rem;
  min-height: 0;
}
.pc-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pc-preview-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #555;
}
.pc-preview-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #333;
  background: #ffcc00;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}
.pc-preview-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.pc-preview-file {
  border: 1px solid rgba(10, 10, 10, 0.12);
  background: #fff;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-preview-file.is-on {
  background: #111;
  color: #fff;
  border-color: #111;
}
.pc-preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: min(58vh, 520px);
  overflow: auto;
  background:
    linear-gradient(45deg, #ececec 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #ececec 25%, transparent 25%) 0 8px / 16px 16px,
    linear-gradient(45deg, transparent 75%, #ececec 75%) 8px -8px / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #ececec 75%) -8px 0 / 16px 16px,
    #f7f7f5;
  border-radius: 12px;
  border: 1px solid rgba(10, 10, 10, 0.06);
  padding: 0.65rem;
  transition: opacity 0.2s ease;
}
.pc-preview-stage.is-loading {
  opacity: 0.72;
}
.pc-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  color: #666;
  font-size: 0.86rem;
  line-height: 1.4;
  padding: 1.2rem 0.8rem;
  max-width: 16rem;
}
.pc-preview-empty strong {
  color: #222;
  font-size: 0.92rem;
}
.pc-preview-empty span {
  font-size: 0.8rem;
  color: #777;
}
.pc-preview-canvas,
.pc-preview-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.12);
  background: #fff;
  animation: pcPreviewIn 0.28s ease;
}
.pc-preview-docx {
  width: 100%;
  transform-origin: top center;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.12);
  overflow: hidden;
  animation: pcPreviewIn 0.28s ease;
}
.pc-preview-docx section,
.pc-preview-docx .docx {
  margin: 0 auto !important;
  box-shadow: none !important;
}
.pc-preview-nav {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 0.4rem;
}
.pc-preview-btn {
  width: 40px;
  height: 36px;
  border: 1px solid rgba(10, 10, 10, 0.14);
  background: #fff;
  border-radius: 10px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #222;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.pc-preview-btn:hover:not(:disabled) {
  border-color: #ffcc00;
  background: #fffceb;
  transform: translateY(-1px);
}
.pc-preview-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.pc-preview-pos {
  text-align: center;
  font-size: 0.8rem;
  color: #555;
  line-height: 1.3;
}
.pc-preview-pos strong {
  color: #111;
  font-size: 0.95rem;
}
.pc-docx-offscreen {
  position: absolute !important;
  left: -99999px !important;
  top: 0 !important;
  width: 794px;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
}
@keyframes pcPreviewIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 860px) {
  .pc-preview-stage {
    min-height: 240px;
    max-height: 420px;
  }
}
