:root {
  --ink: #162033;
  --muted: #667085;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --green: #2196f3;
  --green-soft: #eaf4fe;
  --blue: #225cc7;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
}

.landing-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f8fbf7;
}

.landing-shell::before {
  content: "";
  position: fixed;
  inset: -80px;
  z-index: 0;
  pointer-events: none;
  background-image: url("img/landing-tech-texture.25ccf1d115f3.jpg");
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 940px 940px;
  opacity: .68;
  will-change: background-position;
  animation: landing-tech-drift 72s linear infinite;
}

.landing-shell > * {
  position: relative;
  z-index: 1;
}

@keyframes landing-tech-drift {
  to {
    background-position: 940px 940px;
  }
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 30px rgba(22, 32, 51, .035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 56px 28px;
}

.eyebrow {
  color: var(--green);
  font-weight: 700;
  margin-bottom: 14px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin: 22px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  text-decoration: none;
  font-weight: 700;
  background: var(--paper);
}

.button:hover,
.button:focus {
  color: var(--ink) !important;
  border-color: var(--green);
  background: var(--green-soft);
}

.button.primary {
  color: #fff !important;
  border-color: var(--green);
  background: var(--green);
}

.button.primary:hover,
.button.primary:focus {
  color: #fff !important;
  border-color: #1976d2;
  background: #1976d2;
}

.phone-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(246, 248, 251, .9);
  padding: 16px;
  box-shadow: 0 18px 50px rgba(22, 32, 51, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.phone-screen {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 20px;
  font-weight: 700;
}

.upload-visual {
  padding: 34px 24px;
  text-align: center;
}

.upload-box {
  border: 2px dashed #cfd8dc;
  border-radius: 14px;
  padding: 34px 20px;
  background: #fbfcfd;
}

.upload-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
}

.upload-box span {
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 32px rgba(22, 32, 51, .045);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.step-number {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.step h3 {
  margin: 10px 0 8px;
  font-size: 18px;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.print-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

.print-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.print-card-header {
  background: var(--green-soft);
  color: var(--green);
  text-align: center;
  padding: 18px;
  font-size: 22px;
  font-weight: 800;
}

.print-card-body {
  padding: 28px;
}

.muted {
  color: var(--muted);
}

.form-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 14px;
  line-height: 1.5;
}

.file-input {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-options {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.source-option {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.source-option summary {
  padding: 16px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.source-option form,
.usb-empty {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.usb-file-list {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.usb-file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.usb-file-row:last-child { border-bottom: 0; }
.usb-file-row small { display: block; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.file-kind { padding: 3px 7px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 12px; }

.photo-sheet-canvas {
  display: block;
  width: min(100%, 444px);
  height: auto;
  margin: 0 auto 20px;
  border: 1px solid #cbd5e1;
  background: white;
  box-shadow: 0 8px 24px rgba(22, 32, 51, 0.12);
}

.crop-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.crop-controls input[type="range"] { width: 100%; }
.preset-note { margin: 14px 0; padding: 12px; border-radius: 8px; background: #fff8e6; color: #7c5700; line-height: 1.5; }
.photo-settings { grid-template-columns: minmax(0, 220px); }

.media-wait { text-align: center; }
.media-wait h1 { font-size: 21px; overflow-wrap: anywhere; }
.media-spinner { width: 44px; height: 44px; margin: 4px auto 18px; border: 4px solid #d1fae5; border-top-color: var(--green); border-radius: 50%; animation: media-spin .8s linear infinite; }
@keyframes media-spin { to { transform: rotate(360deg); } }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.field input,
.field select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

/* Copies stepper — tap targets big enough for a thumb on a phone. */
.stepper {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: stretch;
  gap: 8px;
}

.stepper-btn {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.stepper-btn:active {
  background: var(--green-soft);
}

.stepper-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.field .stepper input {
  min-height: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

/* Hide the native spinners — the ± buttons replace them. */
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.full-width {
  width: 100%;
}

@media (max-width: 860px) {
  .landing-shell::before {
    background-size: 700px 700px;
    opacity: .58;
    animation-duration: 84s;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    font-size: 40px;
  }

  .steps,
  .settings-grid,
  .crop-controls {
    grid-template-columns: 1fr;
  }

  .compact-job-meta {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-shell::before {
    animation: none;
  }
}

.status-row {
  margin-bottom: 18px;
}

.status-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.pill-queued {
  background: #eff6ff;
  color: #1d4ed8;
}

.pill-printing {
  background: #fffbeb;
  color: #b45309;
}

.pill-done {
  background: #ecfdf5;
  color: #047857;
}

.pill-failed {
  background: #fef2f2;
  color: #b91c1c;
}

.job-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-job-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.compact-job-meta div {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f8fafc;
}

.compact-job-meta .wide {
  grid-column: 1 / -1;
}

.job-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.job-meta dt {
  color: var(--muted);
  font-size: 14px;
}

.job-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.copy-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 70%;
}

.copy-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(22, 32, 51, 0.08);
}

.copy-button:hover,
.copy-button:focus {
  color: var(--green);
  border-color: var(--green);
  outline: none;
}

.copy-button.copied {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.copy-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.refresh-note {
  text-align: center;
  font-size: 13px;
}

.success-message {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
}

.success-message strong {
  font-size: 18px;
}

.preview-frame {
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.preview-frame img {
  max-width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.preview-missing {
  padding: 40px 10px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.price-row strong {
  font-size: 20px;
}

.back-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  text-decoration: none;
}

.qpay-box {
  text-align: center;
}

.qpay-box .qpay-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto 12px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.qpay-box .button {
  margin-bottom: 10px;
}

.receipt-card {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.receipt-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
}

.receipt-card-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.receipt-card .job-meta {
  margin-bottom: 12px;
  background: #fff;
}

.receipt-pending {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.receipt-pending strong {
  color: var(--ink);
}

.receipt-qr-box {
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}

.receipt-qr-box img {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

/* Print start — mobile-first kiosk upload experience. */
.print-start-page {
  --start-green: #2196f3;
  --start-green-dark: #1976d2;
  --start-green-soft: #eaf4fe;
  --start-lime: #dbeeff;
  --start-ink: #1f2937;
  --start-muted: #667085;
  --start-line: #dbe4ee;
  min-height: 100vh;
  padding: 0 24px 36px;
  color: var(--start-ink);
  background-color: #f5f9ff;
  background-image: url("../smartadmin/img/grid-background.cbec36e4ec3b.svg");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  font-size: 16px;
}

.print-start-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 86px;
  margin: 0 auto;
  padding: 12px 0;
}

.print-start-header-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(78px, 8vw, 104px);
  transform: translate(-50%, -50%);
  text-decoration: none;
}

.print-start-header-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.print-start-kiosk-heading {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.print-start-kiosk-heading strong {
  overflow: hidden;
  color: var(--start-ink);
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-start-kiosk-heading span {
  overflow: hidden;
  color: var(--start-muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-start-logo {
  display: flex;
  align-items: center;
  width: clamp(170px, 22vw, 230px);
  height: auto;
  margin: 0 auto 24px;
  text-decoration: none;
}

.print-start-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.help-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--start-line);
  border-radius: 999px;
  color: var(--start-ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.help-button:hover,
.help-button:focus {
  border-color: #90caf9;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  transform: translateY(-1px);
}

.help-button svg,
.source-chevron {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kiosk-context {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 920px);
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--start-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 30px rgba(31, 37, 31, 0.04);
}

.kiosk-context-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: var(--start-green);
  background: var(--start-green-soft);
}

.kiosk-context-icon svg,
.help-card-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kiosk-context-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.kiosk-context-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kiosk-label,
.kiosk-context-copy > span:last-child {
  color: var(--start-muted);
  font-size: 12px;
}

.kiosk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--start-green-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.kiosk-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2196f3;
  box-shadow: 0 0 0 4px #e3f2fd;
}

.print-upload-hero {
  width: min(100%, 720px);
  margin: 24px auto 0;
  text-align: center;
}

.step-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--start-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.capabilities-heading .eyebrow {
  display: inline-block;
  margin-bottom: 3px;
  color: var(--start-ink);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-transform: none;
}

.printer-unavailable h1 {
  margin: 0;
  color: var(--start-ink);
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.primary-upload-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 55px rgba(33, 150, 243, 0.1);
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.visually-hidden-file:focus + .upload-picker {
  outline: 3px solid rgba(33, 150, 243, 0.22);
  outline-offset: 3px;
}

.upload-picker {
  display: grid;
  min-height: 156px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 24px;
  border: 1.5px dashed #90caf9;
  border-radius: 15px;
  color: var(--start-ink);
  background: #f8fbff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-picker:hover {
  border-color: var(--start-green);
  background: var(--start-green-soft);
  transform: translateY(-1px);
}

.upload-picker-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--start-green);
  box-shadow: 0 8px 18px rgba(33, 150, 243, 0.2);
}

.upload-picker-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-picker strong { font-size: 18px; }
.upload-picker > span:last-child { max-width: 100%; color: var(--start-muted); font-size: 13px; overflow-wrap: anywhere; }

.usb-quick-option {
  width: 100%;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  backdrop-filter: blur(6px);
}

.usb-quick-option[open] {
  border-color: #90caf9;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(33, 150, 243, 0.08);
}

.usb-quick-option summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 14px;
  color: var(--start-ink);
  list-style: none;
  cursor: pointer;
}

.usb-quick-option summary::-webkit-details-marker { display: none; }

.usb-quick-option summary > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.usb-quick-option summary strong { font-size: 14px; }
.usb-quick-option summary small { color: var(--start-muted); font-size: 11px; font-weight: 500; }

.usb-quick-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: #315ea8;
  background: #edf3ff;
}

.usb-quick-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.usb-quick-option[open] .source-chevron { transform: rotate(90deg); }

.usb-quick-option form,
.usb-quick-option .usb-empty {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid #edf0ed;
}

.usb-quick-option .field {
  color: var(--start-ink);
  font-weight: 700;
}

.usb-quick-option .field select {
  min-height: 50px;
  border-color: var(--start-line);
  border-radius: 11px;
  color: var(--start-ink);
  font-size: 14px;
}

.print-capabilities {
  width: min(100%, 720px);
  margin: 54px auto 0;
}

.capabilities-heading {
  max-width: 560px;
  margin-bottom: 18px;
}

.capabilities-heading p {
  margin: 3px 0 0;
  color: #7c857d;
  font-size: 12px;
  line-height: 1.45;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 6px;
  border: 1px solid rgba(147, 197, 253, 0.66);
  border-radius: 16px;
  background: rgba(234, 244, 254, 0.72);
  backdrop-filter: blur(5px);
}

.capability-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 9px 14px;
  border: 0;
  border-left: 1px solid rgba(147, 197, 253, 0.7);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.capability-item:first-child { border-left: 0; }

.capability-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.capability-item strong {
  color: var(--start-ink);
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}

.capability-item > div span {
  color: var(--start-muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

.capability-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
}

.capability-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.document-capability { color: #315ea8; background: #edf3ff; }
.photo-capability { color: #9a6515; background: #fff4dc; }
.portrait-capability { color: var(--start-green-dark); background: var(--start-green-soft); }

.capability-badge {
  align-self: start;
  padding: 3px 7px;
  border: 1px solid #dce5dc;
  border-radius: 999px;
  color: #69736a;
  background: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.source-chevron {
  color: #8a938b;
  transition: transform 160ms ease;
}

.print-help-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 720px);
  margin: 28px auto 0;
  padding: 15px 18px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  color: var(--start-green-dark);
  background: #eff6ff;
}

.help-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #dbeeff;
}

.print-help-card > div {
  display: grid;
  gap: 3px;
}

.print-help-card strong { font-size: 14px; }
.print-help-card span { color: #64748b; font-size: 12px; line-height: 1.45; }

.printer-unavailable {
  width: min(100%, 620px);
  margin: 70px auto;
  padding: 42px 28px;
  border: 1px solid var(--start-line);
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: 0 18px 55px rgba(31, 37, 31, 0.08);
}

.printer-unavailable-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: #a25300;
  background: #fff2dc;
  font-size: 28px;
  font-weight: 800;
}

.printer-unavailable p {
  max-width: 480px;
  margin: 14px auto 22px;
  color: var(--start-muted);
  line-height: 1.6;
}

.print-start-footer {
  width: min(100%, 920px);
  margin: 34px auto 0;
  color: #8b938c;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 680px) {
  .print-start-page { padding: 0 16px 28px; }
  .print-start-header { min-height: 74px; gap: 12px; padding: 9px 0; }
  .print-start-kiosk-heading { max-width: calc(100% - 110px); padding: 0; }
  .print-start-kiosk-heading strong { font-size: 14px; }
  .print-start-kiosk-heading span { font-size: 11px; }
  .print-start-header-logo { width: 82px; }
  .print-start-logo { width: 174px; margin-bottom: 18px; }
  .help-button { min-height: 40px; padding: 0 12px; }
  .print-upload-hero { margin-top: 22px; }
  .primary-upload-form { margin-top: 20px; padding: 11px; border-radius: 18px; }
  .upload-picker { min-height: 138px; padding: 18px; }
  .print-capabilities { margin-top: 42px; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-item { border-top: 1px solid rgba(177, 202, 181, 0.7); border-left: 0; }
  .capability-item:first-child { border-top: 0; }
  .print-help-card { align-items: flex-start; }
}

@media (max-width: 380px) {
  .print-start-page { padding-right: 12px; padding-left: 12px; }
  .print-start-kiosk-heading { max-width: calc(100% - 104px); }
  .print-start-header-logo { width: 72px; }
  .help-button { padding: 0 10px; }
  .help-button svg { width: 17px; height: 17px; }
}

/* Portrait upload — tactile, camera-like picker instead of the browser file control. */
.portrait-upload-picker {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  margin: 14px 0;
  padding: 12px 16px;
  border: 1px solid #d9e8dc;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fcf8, #eef8f0);
  color: #173e23;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.portrait-upload-picker:hover,
.portrait-upload-picker:focus-within {
  border-color: #60ad72;
  box-shadow: 0 12px 30px rgba(34, 112, 54, .12);
  transform: translateY(-1px);
}
.portrait-upload-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  color: #1976d2;
  box-shadow: 0 4px 16px rgba(28, 95, 45, .1);
}
.portrait-upload-visual > svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2; }
.portrait-upload-plus {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 3px solid #eef8f0;
  border-radius: 50%;
  background: #1976d2;
  color: #fff;
  font-size: 9px;
}
.portrait-upload-picker > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.portrait-upload-picker strong { font-size: 17px; }
.portrait-upload-picker small { overflow: hidden; color: #657268; text-overflow: ellipsis; white-space: nowrap; }
.portrait-upload-picker > .fa-chevron-right { color: #7b9481; }

.spreadsheet-layout-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #cfe4d4;
  border-radius: 16px;
  background: #f6fbf7;
}
.spreadsheet-layout-card > div { min-width: 0; display: grid; gap: 2px; }
.spreadsheet-layout-card small { overflow: hidden; color: #6b776e; text-overflow: ellipsis; white-space: nowrap; }
.spreadsheet-layout-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #dbeeff; color: #1976d2; }
.spreadsheet-layout-options { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
.spreadsheet-layout-options label { position: relative; margin: 0; cursor: pointer; }
.spreadsheet-layout-options input { position: absolute; opacity: 0; pointer-events: none; }
.spreadsheet-layout-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px;
  border: 1px solid #d8e1da;
  border-radius: 12px;
  background: #fff;
  color: #526057;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.spreadsheet-layout-options input:checked + span { border-color: #2196f3; background: #eaf4fe; color: #1565c0; box-shadow: inset 0 0 0 1px #2196f3; }
.spreadsheet-preview-refresh { grid-column: 1 / -1; justify-self: end; border: 0; background: transparent; color: #1976d2; font-weight: 800; }
@media (max-width: 560px) {
  .spreadsheet-layout-card { grid-template-columns: auto minmax(0, 1fr); }
  .spreadsheet-layout-options { grid-template-columns: 1fr; }
}

.photo-editor-launch {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #cfe4d4;
  border-radius: 15px;
  background: #f7fbf8;
  color: #1e642f;
  text-align: left;
}
.photo-editor-launch > span:first-child { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: #dcf2e1; font-size: 19px; }
.photo-editor-launch > span:nth-child(2) { display: grid; gap: 2px; }
.photo-editor-launch small { color: #6e7c71; }
.photo-editor-modal .modal-content { position: relative; overflow: hidden; border: 0; border-radius: 22px; box-shadow: 0 24px 70px rgba(18, 45, 25, .25); }
.photo-editor-modal .modal-header { align-items: flex-start; padding: 18px 20px; border-bottom-color: #e7eee8; }
.photo-editor-modal .modal-title { margin: 0; font-size: 21px; }
.photo-editor-modal .modal-header small { color: #708075; }
.photo-editor-modal .modal-body { padding: 16px 20px; background: #f4f7f4; }
.portrait-editor-workspace { display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; align-items: center; gap: 12px; }
.portrait-editor-center { display: grid; min-width: 0; gap: 10px; }
.portrait-editor-stage { position: relative; display: grid; justify-items: center; min-height: 360px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #dfe9e1, #cbd9ce); overflow: hidden; }
#portrait-editor-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: min(55vh, 520px); border-radius: 8px; background: #fff; box-shadow: 0 14px 35px rgba(12, 33, 17, .2); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
#portrait-editor-canvas.is-dragging { cursor: grabbing; }
.portrait-drag-hint { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: rgba(20, 41, 25, .72); color: #fff; font-size: 12px; pointer-events: none; white-space: nowrap; }
.portrait-zoom-control { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; max-width: 360px; width: 100%; margin: 0 auto; border: 1px solid #d5dfd7; border-radius: 14px; background: #fff; overflow: hidden; }
.portrait-zoom-control button { height: 42px; border: 0; background: #fff; color: #1976d2; }
.portrait-zoom-control button:disabled { color: #aeb8b0; cursor: not-allowed; }
.portrait-zoom-control > span { display: flex; align-items: center; justify-content: center; gap: 14px; color: #778279; }
.portrait-zoom-control strong { min-width: 50px; color: #27362b; text-align: center; }
.portrait-effect-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; }
.portrait-effect-toolbar button { display: grid; width: 100%; min-width: 0; min-height: 72px; justify-items: center; align-content: center; gap: 5px; padding: 6px 3px; border: 1px solid #dce4de; border-radius: 13px; background: #fff; color: #4f5c52; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.portrait-effect-toolbar button > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #eff6ff; color: #1976d2; }
.portrait-effect-toolbar button small { max-width: 100%; font-size: 10px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.portrait-effect-toolbar button.is-active { border-color: #2196f3; background: #eaf4fe; color: #1565c0; box-shadow: inset 0 0 0 1px #2196f3; }
.portrait-effect-toolbar button.is-active > span { background: #2196f3; color: #fff; }
.portrait-effect-toolbar button.is-loading > span i { animation: portrait-effect-spin .8s linear infinite; }
@keyframes portrait-effect-spin { to { transform: rotate(360deg); } }
.photo-editor-modal .modal-footer { justify-content: space-between; padding: 13px 20px; }
.portrait-effect-status { max-width: 65%; overflow: hidden; color: #68736a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.photo-ai-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(239, 247, 241, .78);
  -webkit-backdrop-filter: blur(10px) saturate(.82);
  backdrop-filter: blur(10px) saturate(.82);
  cursor: wait;
  touch-action: none;
}
.photo-ai-loading[hidden] { display: none; }
.photo-people-warning {
  position: absolute;
  inset: 0;
  z-index: 21;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(237, 244, 239, .82);
  -webkit-backdrop-filter: blur(10px) saturate(.8);
  backdrop-filter: blur(10px) saturate(.8);
}
.photo-people-warning[hidden] { display: none; }
.photo-people-warning-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(100%, 390px);
  padding: 28px 26px 22px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 26px 70px rgba(24, 57, 33, .18);
  text-align: center;
}
.photo-people-warning-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #fff3d6; color: #9a6811; font-size: 22px; }
.photo-people-warning-card h3 { margin: 0 0 7px; color: #24382a; font-size: 20px; }
.photo-people-warning-card p { margin: 0; color: #68756b; font-size: 13px; line-height: 1.55; }
.photo-people-warning-actions { display: grid; gap: 9px; width: 100%; }
.photo-people-warning-actions .button { min-height: 46px; }
.photo-people-warning-actions .secondary { border: 1px solid #d7e1d9; background: #f7faf8; color: #47604e; }
.photo-people-warning-back { border: 0; background: transparent; color: #6b776e; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.ez-global-loading { position: fixed; z-index: 2100; background: rgba(222, 237, 226, .72); }
.ez-global-loading .photo-ai-loading-card { box-shadow: 0 28px 80px rgba(12, 48, 23, .22); }
.photo-ai-loading-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(100%, 350px);
  padding: 28px 26px 25px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 65px rgba(21, 70, 36, .16);
  text-align: center;
}
.photo-ai-logo-stage { position: relative; display: grid; place-items: center; width: 126px; height: 126px; }
.photo-ai-logo-stage::before,
.photo-ai-logo-stage::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(43, 146, 72, .18);
  border-radius: 50%;
  content: "";
  animation: photo-ai-pulse 2.2s ease-out infinite;
}
.photo-ai-logo-stage::after { animation-delay: 1.1s; }
.photo-ai-logo-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid #e3eee5;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 30px rgba(25, 92, 44, .13);
}
.photo-ai-logo-core img { display: block; width: 70px; height: auto; }
.photo-ai-orbit { position: absolute; inset: 0; border: 2px solid transparent; border-top-color: #2f944b; border-right-color: rgba(47, 148, 75, .25); border-radius: 50%; animation: photo-ai-spin 1.5s linear infinite; }
.photo-ai-spark { position: absolute; z-index: 3; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #34a853; box-shadow: 0 3px 10px rgba(34, 132, 62, .35); }
.photo-ai-spark-one { top: 8px; right: 22px; animation: photo-ai-float 1.8s ease-in-out infinite; }
.photo-ai-spark-two { bottom: 13px; left: 14px; width: 7px; height: 7px; animation: photo-ai-float 1.8s .6s ease-in-out infinite; }
.photo-ai-loading-copy { display: grid; gap: 7px; }
.photo-ai-loading-copy strong { color: #173f24; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
.photo-ai-loading-copy span { color: #6b7c70; font-size: 13px; line-height: 1.5; }
.photo-ai-progress { position: relative; display: block; width: min(100%, 210px); height: 4px; overflow: hidden; border-radius: 999px; background: #dfebe2; }
.photo-ai-progress i { position: absolute; inset-block: 0; left: -42%; width: 42%; border-radius: inherit; background: linear-gradient(90deg, rgba(47, 148, 75, 0), #2f944b 48%, #65bd7c); animation: photo-ai-progress 1.35s ease-in-out infinite; }
@keyframes photo-ai-spin { to { transform: rotate(360deg); } }
@keyframes photo-ai-pulse { 0% { opacity: .7; transform: scale(.72); } 80%, 100% { opacity: 0; transform: scale(1.12); } }
@keyframes photo-ai-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.12); } }
@keyframes photo-ai-progress { 0% { left: -42%; } 65%, 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .photo-ai-logo-stage::before,
  .photo-ai-logo-stage::after,
  .photo-ai-orbit,
  .photo-ai-spark,
  .photo-ai-progress i { animation: none; }
  .photo-ai-logo-stage::before { opacity: .45; transform: scale(.92); }
  .photo-ai-logo-stage::after { display: none; }
  .photo-ai-progress i { left: 0; width: 100%; opacity: .55; }
}
@media (max-width: 640px) {
  .photo-editor-modal .modal-dialog { --bs-modal-margin: 20px; margin: 20px 8px; }
  .photo-editor-modal .modal-content { max-height: calc(100dvh - 40px); }
  .photo-editor-modal .modal-header { padding: 14px 16px; }
  .photo-editor-modal .modal-title { font-size: 18px; }
  .photo-editor-modal .modal-body { min-height: 0; padding: 10px 8px; overflow-y: auto; }
  .portrait-editor-workspace { grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 6px; }
  .portrait-editor-center { gap: 7px; }
  .portrait-editor-stage { min-height: 0; padding: 6px; border-radius: 14px; }
  #portrait-editor-canvas { width: 100%; max-height: none; }
  .portrait-drag-hint { bottom: 9px; gap: 4px; padding: 5px 7px; font-size: 9px; }
  .portrait-effect-toolbar { gap: 6px; }
  .portrait-effect-toolbar button { min-height: 60px; padding: 4px 2px; border-radius: 11px; }
  .portrait-effect-toolbar button > span { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
  .portrait-effect-toolbar button small { font-size: 8px; line-height: 1.12; }
  .portrait-zoom-control { grid-template-columns: 34px minmax(0, 1fr) 34px; border-radius: 11px; }
  .portrait-zoom-control button { height: 36px; }
  .portrait-zoom-control > span { gap: 6px; font-size: 11px; }
  .portrait-zoom-control strong { min-width: 42px; font-size: 13px; }
  .photo-editor-modal .modal-footer { padding: 10px 16px; }
  .photo-ai-loading { padding: 14px; }
  .photo-people-warning { padding: 14px; }
  .photo-people-warning-card { gap: 13px; padding: 22px 18px 18px; border-radius: 20px; }
  .photo-people-warning-icon { width: 52px; height: 52px; border-radius: 16px; font-size: 19px; }
  .photo-people-warning-card h3 { font-size: 18px; }
  .photo-ai-loading-card { gap: 15px; padding: 22px 18px 20px; border-radius: 20px; }
  .photo-ai-logo-stage { width: 112px; height: 112px; }
  .photo-ai-logo-core { width: 82px; height: 82px; }
  .photo-ai-logo-core img { width: 63px; }
  .photo-ai-loading-copy strong { font-size: 17px; }
}

/* Confirm step — shares the print-start shell while keeping preview controls distinct. */
.confirm-shell {
  width: min(100%, 1400px);
  margin: 22px auto 0;
}

.confirm-step-label {
  display: block;
  margin: 0 0 12px;
  text-align: center;
}

.confirm-document-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(176, 204, 181, 0.7);
  border-radius: 15px;
  background: rgba(237, 248, 239, 0.8);
  backdrop-filter: blur(5px);
}

.confirm-document-heading > div { display: grid; gap: 3px; min-width: 0; }

.confirm-document-heading h1 {
  overflow: hidden;
  margin: 0;
  color: var(--start-ink);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confirm-document-heading p { margin: 0; color: var(--start-muted); font-size: 12px; }

.confirm-file-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #315ea8;
  background: #edf3ff;
}

.confirm-photo-icon { color: #9a6515; background: #fff4dc; }

.confirm-file-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-error { margin-bottom: 14px; background: rgba(254, 242, 242, 0.94); }

.confirm-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, 0.95fr);
  align-items: start;
  gap: 14px;
}

.confirm-preview-panel,
.confirm-settings-card {
  min-width: 0;
  border: 1px solid rgba(190, 210, 192, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 42px rgba(31, 74, 36, 0.08);
  backdrop-filter: blur(6px);
}

.confirm-preview-panel { padding: 12px; }

.confirm-top-preview {
  width: min(100%, 390px);
  margin: 0 auto 18px;
  padding: 10px;
  transition: width 180ms ease;
}

.confirm-top-preview .confirm-panel-label {
  margin-bottom: 8px;
  font-size: 11px;
}

.confirm-top-preview .confirm-preview-frame {
  min-height: 420px;
  padding: 7px;
}

.confirm-top-preview .confirm-preview-frame img {
  max-height: 450px;
  transition: transform 180ms ease;
}

.confirm-top-preview.is-landscape {
  width: min(100%, 320px);
}

.confirm-top-preview.is-landscape .confirm-preview-frame {
  position: relative;
  min-height: 0;
  aspect-ratio: 1.414 / 1;
  overflow: hidden;
}

.confirm-top-preview.is-landscape .confirm-preview-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70.71%;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%) rotate(90deg);
}

.confirm-top-photo-preview {
  width: min(100%, 420px);
  text-align: center;
}

.confirm-top-photo-preview .photo-sheet-canvas {
  display: block;
  width: 100%;
  max-height: 560px;
  margin: 0 auto;
  object-fit: contain;
  box-shadow: 0 7px 20px rgba(31, 37, 31, 0.1);
}

.confirm-panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--start-ink);
  font-size: 13px;
  font-weight: 800;
}

.confirm-panel-label small {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  font-size: 10px;
  font-weight: 800;
}

.confirm-panel-meta { justify-content: flex-end; }

.confirm-panel-meta.photo-preview-meta { justify-content: space-between; }

.photo-count-stepper {
  display: grid;
  grid-template-columns: 40px minmax(48px, auto) 40px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(143, 198, 149, 0.7);
  border-radius: 999px;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
}

.photo-count-stepper button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.photo-count-stepper button:active { background: rgba(33, 150, 243, 0.12); }
.photo-count-stepper button:disabled { opacity: 0.35; cursor: default; }

.photo-count-stepper output {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}

.photo-count-stepper output strong { font-size: 14px; }
.photo-count-stepper output span { font-size: 8px; font-weight: 800; }

.confirm-preview-action {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
  border: 1px solid rgba(147, 197, 253, 0.66);
  border-radius: 10px;
  color: var(--start-green-dark);
  background: rgba(234, 244, 254, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 7px 20px rgba(33, 150, 243, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  font-family: inherit;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.confirm-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.confirm-preview-actions .confirm-preview-action {
  min-width: 0;
  margin-top: 0;
  padding: 0 7px;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.confirm-preview-update {
  border-color: rgba(143, 198, 149, 0.82);
  background: rgba(222, 243, 226, 0.72);
}

.photo-source-modal .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 24px;
}

.photo-source-options { display: grid; gap: 10px; }
.photo-source-options form { margin: 0; }

.photo-source-option {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid var(--start-line);
  border-radius: 15px;
  color: var(--start-ink);
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
}

.photo-source-option > span:first-child {
  display: grid;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  place-items: center;
  font-size: 19px;
}

.photo-source-option > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.photo-source-option strong { font-size: 14px; }
.photo-source-option small { overflow: hidden; color: var(--start-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.photo-source-option > i { color: var(--start-green); }

.photo-source-usb {
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid var(--start-line);
}

.photo-source-usb-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 13px; }
.photo-source-usb-list { display: grid; gap: 7px; max-height: 210px; margin-bottom: 10px; overflow-y: auto; }
.photo-source-usb-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--start-line);
  border-radius: 11px;
  cursor: pointer;
}
.photo-source-usb-list label > span { display: grid; min-width: 0; }
.photo-source-usb-list strong,
.photo-source-usb-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-source-usb-list strong { font-size: 12px; }
.photo-source-usb-list small { color: var(--start-muted); font-size: 9px; }

.print-cancel-form {
  display: flex;
  justify-content: center;
  width: min(100%, 680px);
  margin: 18px auto 0;
}

.print-cancel-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid #e6b8b8;
  border-radius: 12px;
  color: #a62d2d;
  background: rgba(255, 247, 247, 0.88);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.print-cancel-button:hover { color: #8c2020; background: #fff1f1; }

.confirm-preview-action i { font-size: 16px; }

.confirm-preview-action:hover {
  border-color: rgba(100, 181, 246, 0.78);
  color: var(--start-green-dark);
  background: rgba(219, 238, 255, 0.82);
  transform: translateY(-1px);
}

.confirm-preview-action,
.confirm-preview-action:hover,
.confirm-preview-action:focus,
.confirm-preview-action span {
  text-decoration: none !important;
}

.confirm-preview-action.is-disabled,
.confirm-preview-action:disabled {
  cursor: not-allowed;
  color: #899189;
  background: #f2f4f2;
  transform: none;
}

.confirm-preview-frame {
  display: grid;
  min-height: 390px;
  margin: 0;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #f6f8f6;
}

.confirm-preview-frame img {
  width: auto;
  max-width: 100%;
  max-height: 470px;
  border-color: #dfe5df;
  box-shadow: 0 7px 20px rgba(31, 37, 31, 0.08);
}

.confirm-settings-card { padding: 16px; }

.confirm-settings-only {
  grid-template-columns: minmax(0, 1fr);
}

.confirm-settings-card h2 {
  margin: 0;
  color: var(--start-ink);
  font-size: 19px;
  letter-spacing: -0.015em;
}

.confirm-settings-note {
  margin: 5px 0 16px;
  color: var(--start-muted);
  font-size: 11px;
  line-height: 1.45;
}

.confirm-settings-grid { grid-template-columns: 1fr; gap: 13px; margin: 0; }

.confirm-settings-card .field { color: var(--start-ink); font-size: 12px; font-weight: 700; }

.confirm-settings-card .field input,
.confirm-settings-card .field select {
  min-height: 46px;
  border-color: var(--start-line);
  border-radius: 11px;
  color: var(--start-ink);
  background: #fff;
  font-size: 14px;
}

.confirm-settings-card .field select:disabled { color: #777f78; background: #f2f4f2; }
.confirm-settings-card .field-copies {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.confirm-settings-card .field-copies > label {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.confirm-settings-card .field-copies .stepper {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  flex: 0 0 auto;
  justify-content: center;
  gap: 0;
  width: 136px;
  padding: 2px 8px;
  border-radius: 11px;
  background: #2196f3;
  box-shadow: 0 7px 18px rgba(33, 150, 243, 0.18);
}

.confirm-settings-card .field-copies .stepper-btn,
.confirm-settings-card .field-copies .stepper input {
  width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.confirm-settings-card .field-copies .stepper-btn {
  font-size: 23px;
  font-weight: 500;
}

.confirm-settings-card .field-copies .stepper input {
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

.confirm-settings-card .field-copies .stepper-btn:active { background: rgba(255, 255, 255, 0.12); }
.confirm-settings-card .field-copies .stepper-btn:disabled { color: rgba(255, 255, 255, 0.5); }

.print-type-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.print-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.print-type-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 50px;
  padding: 8px 42px 8px 10px;
  border: 1px solid var(--start-line);
  border-radius: 12px;
  color: #626b63;
  background: rgba(248, 251, 248, 0.92);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.print-type-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.print-type-option-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #6d786e;
  background: #edf1ed;
  font-size: 14px;
}

.print-type-option-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.print-type-badge {
  position: absolute;
  top: 6px;
  right: 7px;
  padding: 2px 6px;
  border: 1px solid #dce5dc;
  border-radius: 999px;
  color: #707971;
  background: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
}

.print-type-option:has(input:checked) {
  border-color: #90caf9;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.1);
}

.print-type-option:has(input:checked) .print-type-option-icon {
  color: #fff;
  background: var(--start-green);
}

.print-type-option:has(input:checked) .print-type-badge {
  border-color: #bfdbfe;
  color: var(--start-green-dark);
}

.print-type-option:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.print-type-option:focus-within {
  outline: 2px solid rgba(33, 150, 243, 0.28);
  outline-offset: 2px;
}

.paper-size-choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.paper-size-choice-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.paper-size-choice-option {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--start-line);
  border-radius: 12px;
  color: #626b63;
  background: rgba(248, 251, 248, 0.92);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.paper-size-choice-option[hidden] { display: none; }

.paper-size-choice-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.paper-size-choice-icon {
  display: block;
  width: 16px;
  height: 22px;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.75);
}

.paper-size-choice-option:has(input:checked) {
  border-color: #90caf9;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.1);
}

.paper-size-choice-option:focus-within {
  outline: 2px solid rgba(33, 150, 243, 0.28);
  outline-offset: 2px;
}

.color-choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.color-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.color-choice-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 50px;
  padding: 8px 12px;
  border: 1px solid var(--start-line);
  border-radius: 12px;
  color: #626b63;
  background: rgba(248, 251, 248, 0.92);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.color-choice-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.color-choice-copy strong {
  color: inherit;
  font: inherit;
}

.color-choice-option:has(input[value="false"]) .color-choice-copy strong {
  font-weight: 900;
}

.color-choice-copy small {
  color: #8a928b;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.color-choice-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.color-choice-option svg { flex: 0 0 auto; }

.color-choice-option:has(input:checked) {
  border-color: #90caf9;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.1);
}

.color-choice-option:has(input:disabled) {
  opacity: 0.48;
  cursor: not-allowed;
}

.color-choice-option:focus-within {
  outline: 2px solid rgba(33, 150, 243, 0.28);
  outline-offset: 2px;
}

.side-choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.side-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.side-choice-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 8px 12px;
  border: 1px solid var(--start-line);
  border-radius: 12px;
  color: #626b63;
  background: rgba(248, 251, 248, 0.92);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.side-choice-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.side-choice-option i {
  flex: 0 0 auto;
  color: #7b847c;
  font-size: 18px;
}

.side-choice-option:has(input:checked) {
  border-color: #90caf9;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.1);
}

.side-choice-option:has(input:checked) i { color: var(--start-green); }

.side-choice-option:focus-within {
  outline: 2px solid rgba(33, 150, 243, 0.28);
  outline-offset: 2px;
}

.orientation-choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.orientation-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.orientation-choice-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 8px 12px;
  border: 1px solid var(--start-line);
  border-radius: 12px;
  color: #626b63;
  background: rgba(248, 251, 248, 0.92);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.orientation-choice-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.orientation-choice-option i {
  flex: 0 0 auto;
  color: #7b847c;
  font-size: 18px;
}

.orientation-choice-option:has(input:checked) {
  border-color: #90caf9;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.1);
}

.orientation-choice-option:has(input:checked) i { color: var(--start-green); }

.orientation-choice-option:focus-within {
  outline: 2px solid rgba(33, 150, 243, 0.28);
  outline-offset: 2px;
}

.confirm-more-options,
.confirm-more-options[open] {
  margin-top: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.confirm-more-options summary {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 36px;
  padding: 4px 0;
}

.confirm-more-options summary .usb-quick-icon {
  display: inline-block;
  width: auto;
  height: auto;
  color: var(--start-muted);
  background: transparent;
  font-size: 14px;
  text-align: center;
}

.confirm-more-options summary strong { font-size: 12px; }

.confirm-more-options .usb-empty {
  padding: 12px 0 0;
  border-top-color: var(--start-line);
}

.confirm-more-options:not([open]) > .usb-empty { display: none; }

.pages-per-sheet-field {
  min-width: 0;
  margin: 13px 0 0;
  padding: 13px 0 0;
  border: 0;
  border-top: 1px solid var(--start-line);
}

.pages-per-sheet-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pages-per-sheet-options label { position: relative; margin: 0; cursor: pointer; }
.pages-per-sheet-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pages-per-sheet-options span {
  display: grid;
  min-height: 42px;
  border: 1px solid var(--start-line);
  border-radius: 11px;
  color: var(--start-muted);
  background: #fff;
  place-items: center;
  font-size: 14px;
  font-weight: 850;
}
.pages-per-sheet-options input:checked + span {
  border-color: var(--start-green);
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  box-shadow: 0 0 0 1px rgba(33, 150, 243, .12);
}
.pages-per-sheet-field > small { display: block; margin-top: 7px; color: var(--start-muted); font-size: 10px; }

.confirm-settings-card[aria-busy="true"] { pointer-events: none; opacity: .68; }

.document-preview-modal .modal-xl { --bs-modal-width: 1060px; }
.document-preview-modal .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: #f5f8f5;
  box-shadow: 0 26px 80px rgba(16, 39, 20, .28);
}
.document-preview-workspace {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.document-preview-modal .modal-header,
.document-preview-modal .modal-footer {
  padding: 18px 22px;
  border-color: var(--start-line);
  background: rgba(255, 255, 255, .96);
}
.document-preview-modal .modal-header > div { display: grid; gap: 2px; min-width: 0; }
.document-preview-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--start-ink);
  font-size: 20px;
  font-weight: 900;
}
.document-preview-modal .modal-title i { color: var(--start-green); }
.document-preview-modal .modal-header small {
  overflow: hidden;
  color: var(--start-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-preview-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--start-line);
  background: #fff;
}
.document-preview-toolbar fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.document-preview-toolbar legend { margin-bottom: 6px; color: var(--start-muted); font-size: 10px; font-weight: 800; }
.preview-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 13px;
  background: #edf2ee;
}
#preview-duplex-controls .preview-segmented,
#preview-orientation-controls .preview-segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.preview-segmented button {
  min-height: 40px;
  padding: 6px 9px;
  border: 0;
  border-radius: 10px;
  color: #667067;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}
.preview-segmented button.is-active {
  color: #fff;
  background: var(--start-green);
  box-shadow: 0 5px 14px rgba(33, 150, 243, .22);
}
.preview-segmented button:disabled { opacity: .38; cursor: not-allowed; }
.document-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--start-line);
  background: #fbfdfb;
}
.document-preview-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #dbe7dc;
  border-radius: 999px;
  color: #59645b;
  background: #fff;
  font-size: 10px;
}
.document-preview-summary i { color: var(--start-green); }
.document-preview-modal .modal-body { padding: 20px 22px 26px; }
.document-preview-workspace > .modal-body { overflow-y: auto; }
.document-sheet-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  gap: 18px;
}
.document-sheet-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  max-width: 330px;
  width: 100%;
  margin: 0 auto;
}
.document-sheet-side > header { display: flex; align-items: center; justify-content: space-between; color: var(--start-muted); font-size: 10px; }
.document-sheet-side > header strong { color: var(--start-ink); font-size: 11px; }
.document-sheet-grid {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1.414;
  gap: 7px;
  padding: 13px;
  border: 1px solid #d4ded5;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(27, 45, 30, .12);
}
.document-sheet-side.is-landscape .document-sheet-grid { aspect-ratio: 1.414 / 1; }
.document-sheet-grid.pages-1 { grid-template-columns: 1fr; }
.document-sheet-grid.pages-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.document-sheet-grid.pages-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.document-sheet-page {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8e2;
  background: #f7f9f7;
  place-items: center;
}
.document-sheet-page img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.document-sheet-page > span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #fff;
  background: rgba(26, 48, 30, .78);
  font-size: 8px;
  font-weight: 800;
}
.document-sheet-page.is-empty { border-style: dashed; background: #fafbfa; }
.document-preview-modal .modal-footer { justify-content: space-between; gap: 14px; }
.document-preview-modal .modal-footer p { margin: 0; color: var(--start-muted); font-size: 10px; }
.document-preview-modal .modal-footer .button { min-width: 190px; min-height: 44px; border-radius: 12px; }

.page-picker-modal .modal-lg { --bs-modal-width: 720px; }

.page-picker-modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(20, 29, 21, 0.24);
}

.page-picker-modal .modal-header,
.page-picker-modal .modal-footer {
  padding: 20px 28px;
  border-color: var(--start-line);
}

.page-picker-modal .modal-title {
  color: var(--start-ink);
  font-size: 20px;
  font-weight: 900;
}

.page-picker-modal .modal-body { padding: 24px 28px; }
.page-picker-modal .input-group .form-control { border-radius: 14px 0 0 14px; }
.page-picker-modal .input-group .btn {
  min-width: 140px;
  border-color: var(--start-green);
  border-radius: 0 14px 14px 0;
  color: var(--start-green-dark);
  background: #fff;
  font-weight: 800;
}

.page-picker-modal .input-group .btn:hover {
  color: #fff;
  background: var(--start-green);
}

.page-picker-card {
  position: relative;
  display: grid;
  grid-template-rows: 185px auto;
  overflow: hidden;
  padding: 0;
  border-width: 1px;
  border-radius: 18px;
  color: var(--start-ink);
  background: #f8faf8;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.page-picker-card:hover { transform: translateY(-1px); }
.page-picker-card.is-selected {
  border-color: var(--start-green) !important;
  box-shadow: 0 0 0 1px var(--start-green), 0 8px 20px rgba(33, 150, 243, 0.08);
}

.page-picker-image-wrap {
  position: relative;
  display: grid;
  height: auto;
  min-height: 0;
  padding: 16px;
  place-items: center;
  background: #f6f7f6;
}

.page-picker-card .page-picker-image-wrap img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto !important;
  height: calc(100% - 24px) !important;
  max-width: calc(100% - 24px) !important;
  max-height: calc(100% - 24px) !important;
  border: 1px solid #eef1ee;
  background: #fff;
  object-fit: contain;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease;
}

.page-picker-modal.is-landscape .page-picker-card .page-picker-image-wrap img {
  transform: translate(-50%, -50%) rotate(90deg);
}

.page-picker-check {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 3px solid #fff;
  background: var(--start-green) !important;
  box-shadow: 0 3px 9px rgba(24, 60, 28, 0.2);
}

.page-picker-card .card-footer {
  display: block;
  padding: 14px;
  border-top: 1px solid var(--start-line);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.page-picker-modal .modal-footer .button {
  min-height: 52px;
  border-radius: 14px;
  font-weight: 900;
}

.confirm-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.confirm-total-block {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.confirm-total-block span {
  color: var(--start-muted);
  font-size: 11px;
  font-weight: 600;
}

.confirm-total-block strong { color: var(--start-green-dark); font-size: 21px; }
.button.confirm-submit { min-height: 50px; border-radius: 12px; font-size: 14px; }
.button.confirm-payment-button { width: auto; min-width: 230px; }
.button.confirm-payment-button:disabled {
  border-color: #cbd4cd;
  background: #dfe5e0;
  color: #8b958d;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.terms-consent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
  padding: 7px;
  border: 1px solid #d8e3da;
  border-radius: 15px;
  background: #f7faf8;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.terms-consent-card.is-accepted {
  border-color: #90caf9;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(47, 148, 75, .12);
}
.terms-check-label {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 7px 9px;
  border-radius: 11px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.terms-check-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.terms-checkmark {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #8fa197;
  border-radius: 9px;
  background: #fff;
  color: transparent;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.terms-check-label input:focus-visible + .terms-checkmark { outline: 3px solid rgba(47, 148, 75, .24); outline-offset: 2px; }
.terms-check-label input:checked + .terms-checkmark { border-color: #2196f3; background: #2196f3; color: #fff; transform: scale(1.03); }
.terms-check-label > span:last-child { display: grid; min-width: 0; gap: 1px; }
.terms-check-label strong { color: #26342a; font-size: 13px; }
.terms-check-label small { color: #737f76; font-size: 10px; }
.terms-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 9px 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #1976d2;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terms-open-button:hover,
.terms-open-button:focus-visible { background: #eaf4fe; }

.terms-modal .modal-content {
  overflow: hidden;
  max-height: min(88dvh, 820px);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(18, 45, 25, .28);
}
.terms-modal .modal-header { align-items: flex-start; padding: 19px 22px 16px; border-bottom-color: #e4ece6; }
.terms-modal .modal-title { margin: 3px 0 1px; color: #213126; font-size: 23px; }
.terms-modal .modal-header small { color: #718078; }
.terms-modal-eyebrow { color: #1976d2; font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.terms-modal-body { overflow-y: auto; padding: 18px 22px 28px; background: #f6f8f6; overscroll-behavior: contain; }
.terms-privacy-highlight {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid #bfdbfe;
  border-radius: 15px;
  background: #eff6ff;
  color: #1565c0;
}
.terms-privacy-highlight > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #dbeeff; font-size: 18px; }
.terms-privacy-highlight > div { display: grid; gap: 2px; }
.terms-privacy-highlight span { color: #64748b; font-size: 11px; line-height: 1.45; }
.terms-section { margin-top: 10px; padding: 15px 16px; border: 1px solid #e0e7e1; border-radius: 15px; background: #fff; }
.terms-section h3 { margin: 0 0 8px; color: #26362b; font-size: 14px; }
.terms-section p { margin: 7px 0 0; color: #58645b; font-size: 12px; line-height: 1.62; }
.terms-legal-sources a { color: #1976d2; font-weight: 700; }
.terms-hash { display: grid; gap: 4px; margin: 14px 2px 0; color: #77827a; font-size: 9px; }
.terms-hash code { overflow-wrap: anywhere; color: #6b776e; font-size: 8px; }
.terms-modal-footer { position: sticky; bottom: 0; padding: 13px 22px; border-top-color: #dfe8e1; background: #fff; }
.terms-modal-footer .button { min-height: 54px; border-radius: 14px; font-weight: 900; }

.upload-retention-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #475569;
  font-size: 11px;
  line-height: 1.45;
}
.upload-retention-note > i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #dbeeff; color: #1976d2; font-size: 16px; }
.upload-retention-note strong { color: #1e3a5f; }

.payment-card { padding: 20px; }

.payment-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.payment-card-heading > div { min-width: 0; }

.payment-card-heading h1 {
  margin: 0;
  color: var(--start-ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.payment-card-heading p {
  margin: 3px 0 0;
  color: var(--start-muted);
  font-size: 12px;
}

.payment-heading-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  font-size: 19px;
}

.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.payment-summary-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  background: #f6f8f6;
}

.payment-summary-grid > .wide { grid-column: 1 / -1; }

.payment-summary-grid dt {
  color: var(--start-muted);
  font-size: 10px;
  font-weight: 600;
}

.payment-summary-grid dd {
  overflow: hidden;
  margin: 0;
  color: var(--start-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-amount-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid #cfe2d1;
  border-radius: 12px;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
}

.payment-amount-panel > div { display: grid; gap: 1px; }
.payment-amount-panel span { color: var(--start-muted); font-size: 11px; font-weight: 600; }
.payment-amount-panel strong { font-size: 24px; line-height: 1.2; }
.payment-amount-panel > i { font-size: 22px; opacity: 0.75; }

.payment-qpay-box {
  padding-top: 2px;
  text-align: center;
}

.payment-qpay-box h2 {
  margin: 0 0 12px;
  color: var(--start-ink);
  font-size: 16px;
  font-weight: 900;
}

.payment-qpay-box .qpay-qr {
  width: 210px;
  height: 210px;
  margin-bottom: 10px;
  border-color: var(--start-line);
  border-radius: 14px;
}

.payment-qpay-box > .muted { margin: 0 auto 12px; font-size: 12px; }

.qpay-bank-picker {
  display: none;
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid var(--start-line);
  text-align: left;
}

.qpay-bank-picker h3 {
  margin: 0;
  color: var(--start-ink);
  font-size: 14px;
  font-weight: 900;
}

.qpay-bank-picker > p {
  margin: 3px 0 10px;
  color: var(--start-muted);
  font-size: 11px;
}

.qpay-bank-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.qpay-bank-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 92px;
  padding: 8px 4px 7px;
  border: 1px solid var(--start-line);
  border-radius: 14px;
  color: var(--start-ink);
  background: #fbfdfb;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.qpay-bank-link:hover,
.qpay-bank-link:focus-visible {
  border-color: var(--start-green);
  color: var(--start-green-dark);
  box-shadow: 0 6px 18px rgba(30, 101, 53, 0.12);
  transform: translateY(-1px);
}

.qpay-bank-link > span:nth-child(2) {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.qpay-bank-logo {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e8ede9;
  border-radius: 15px;
  color: var(--start-green-dark);
  background: #fff;
  box-shadow: 0 3px 10px rgba(22, 69, 35, 0.07);
}

.qpay-bank-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.payment-qpay-box .payment-actions .button { margin: 0; }

.payment-qpay-box .refresh-note { margin: 12px 0 0; }

.payment-mock-form {
  padding-top: 2px;
  text-align: center;
}

.payment-mock-form p { margin: 0 0 10px; font-size: 11px; }

.payment-waiting-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 70px;
  color: var(--start-muted);
  font-size: 13px;
}

.payment-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--start-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.payment-back-link:hover { color: var(--start-green-dark); }

/* Payment success — receipt first, then live print progress. */
.status-shell {
  width: min(100%, 680px);
  margin: 22px auto 0;
}

.status-card {
  padding: 20px;
  border: 1px solid #d3e2d4;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 55px rgba(34, 72, 40, 0.09);
}

.payment-success-banner {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #bfe0c5;
  border-radius: 18px;
  color: var(--start-green-dark);
  background: linear-gradient(135deg, #eaf4fe, #f8fbff);
}

.payment-success-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--start-green);
  box-shadow: 0 8px 20px rgba(33, 150, 243, 0.2);
}

.payment-success-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.payment-success-kicker {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-success-banner h1 {
  margin: 0;
  color: var(--start-ink);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.payment-success-banner p {
  margin: 5px 0 0;
  color: #58705c;
  font-size: 12px;
  line-height: 1.45;
}

.status-page .status-receipt-card {
  margin: 14px 0 0;
  padding: 16px;
  border-color: var(--start-line);
  border-radius: 18px;
  background: #fff;
}

.status-page .receipt-card-heading { margin-bottom: 14px; }

.status-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-section-title > div { display: grid; gap: 1px; }
.status-section-title strong { color: var(--start-ink); font-size: 16px; font-weight: 900; }
.status-section-title span { color: var(--start-muted); font-size: 10px; font-weight: 600; }

.status-section-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
}

.status-page .receipt-card-heading small {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
  font-size: 9px;
}

.status-page .receipt-pending {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-color: #cddfce;
  border-radius: 13px;
  background: #fbfdfb;
}

.status-page .receipt-pending > div { display: grid; gap: 2px; }
.status-page .receipt-pending span { font-size: 11px; line-height: 1.4; }

.receipt-loading-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--start-green);
  background: var(--start-green-soft);
}

.receipt-issued-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.receipt-issued-layout:has(.receipt-qr-box[hidden]) { grid-template-columns: 1fr; }

.status-page .receipt-qr-box { margin: 0; }

.status-page .receipt-qr-box img {
  width: 168px;
  border-color: var(--start-line);
  border-radius: 14px;
  padding: 8px;
}

.receipt-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.receipt-detail-item {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #e8ede8;
  border-radius: 12px;
  background: #fafcf9;
}

.receipt-detail-wide { grid-column: 1 / -1; }

.receipt-detail-item dt {
  color: var(--start-muted);
  font-size: 9px;
  font-weight: 700;
}

.receipt-detail-item dd {
  min-width: 0;
  margin: 0;
  color: var(--start-ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.status-page .copy-field {
  width: 100%;
  max-width: none;
  justify-content: space-between;
  gap: 6px;
}

.status-page .copy-button {
  position: static;
  top: auto;
  right: auto;
  width: 30px;
  height: 30px;
  border-color: #dce4dc;
  border-radius: 9px;
  color: var(--start-muted);
  box-shadow: none;
}

.status-page .copy-button:hover,
.status-page .copy-button:focus-visible {
  border-color: #a9c9af;
  color: var(--start-green-dark);
  background: var(--start-green-soft);
}

.status-page .copy-button.copied {
  border-color: var(--start-green);
  color: #fff;
  background: var(--start-green);
}

.status-page .copy-button svg { width: 15px; height: 15px; }

.print-status-card {
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid var(--start-line);
  border-radius: 16px;
  background: #fafcf9;
}

.print-status-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.print-status-heading > div { display: grid; gap: 1px; }
.print-status-heading > div > span { color: var(--start-ink); font-size: 14px; font-weight: 900; }
.print-status-heading small { color: var(--start-muted); font-size: 9px; }
.print-status-card > p:not(.refresh-note) { margin: 9px 0 0; color: var(--start-muted); font-size: 11px; line-height: 1.45; }
.print-status-card .status-pill { flex: 0 0 auto; padding: 5px 9px; font-size: 10px; font-weight: 800; }
.print-status-card .success-message { margin: 12px 0 0; border-radius: 12px; font-size: 11px; }
.print-status-card .success-message strong { font-size: 13px; }
.print-status-card .refresh-note { margin: 10px 0 0; font-size: 10px; }

.status-job-details {
  margin-top: 12px;
  border: 1px solid var(--start-line);
  border-radius: 14px;
  background: #fff;
}

.status-job-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: var(--start-muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.status-job-details summary::-webkit-details-marker { display: none; }
.status-job-details summary i { font-size: 9px; transition: transform 0.15s ease; }
.status-job-details[open] summary i { transform: rotate(180deg); }
.status-job-details .job-meta { margin: 0 12px 12px; border-color: #edf0ed; }
.status-print-another { margin-top: 12px; }
.status-page .print-help-card { width: min(100%, 680px); margin-top: 18px; }

@media (max-width: 680px) {
  .status-shell { margin-top: 18px; }
  .status-card { padding: 13px; border-radius: 19px; }
  .payment-success-banner { grid-template-columns: 46px minmax(0, 1fr); gap: 11px; padding: 15px 13px; }
  .payment-success-icon { width: 46px; height: 46px; }
  .payment-success-banner h1 { font-size: 20px; }
  .status-page .status-receipt-card { padding: 13px; }
  .receipt-issued-layout { grid-template-columns: 1fr; }
  .status-page .receipt-qr-box img { width: 154px; }
  .receipt-detail-grid { grid-template-columns: 1fr; }
  .receipt-detail-wide { grid-column: auto; }
  .receipt-detail-item { min-height: 58px; }
  .status-job-details .compact-job-meta { grid-template-columns: 1fr; }
  .status-job-details .compact-job-meta .wide { grid-column: auto; }
  .status-job-details .compact-job-meta div { align-items: baseline; padding: 9px 10px; }
  .status-job-details .compact-job-meta dt { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
  .status-job-details .compact-job-meta dd { min-width: 0; font-size: 12px; line-height: 1.35; }
}

.confirm-crop-controls { grid-template-columns: 1fr; gap: 10px; margin: 14px 0; }
.confirm-crop-controls .field { gap: 2px; }
.confirm-settings-card .preset-note { margin: 12px 0; padding: 10px; font-size: 11px; }

.confirm-photo-count {
  margin: 0 0 12px;
  color: var(--start-muted);
  font-size: 11px;
  line-height: 1.45;
}

.confirm-page .print-help-card { width: min(100%, 1400px); margin-top: 22px; }

@media (max-width: 760px) {
  .confirm-shell { margin-top: 20px; }
  .confirm-top-preview { width: min(100%, 200px); margin-bottom: 16px; }
  .confirm-top-preview.is-landscape { width: min(100%, 290px); }
  .confirm-top-preview .confirm-preview-frame { min-height: 215px; }
  .confirm-top-preview .confirm-preview-frame img { max-height: 235px; }
  .confirm-top-photo-preview { width: min(100%, 215px); }
  .confirm-step-label { margin-bottom: 10px; }
  .confirm-document-heading { padding: 10px 12px; }
  .confirm-document-heading h1 { font-size: 15px; }
  .confirm-workspace { grid-template-columns: 1fr; }
  .confirm-preview-frame { min-height: 300px; }
  .confirm-preview-frame img { max-height: 410px; }
  .confirm-settings-card { padding: 14px; }
  .page-picker-modal .modal-dialog { margin: 12px; }
  .document-preview-modal .modal-dialog { margin: 8px; }
  .document-preview-modal .modal-content { max-height: calc(100dvh - 16px); border-radius: 21px; }
  .document-preview-modal .modal-header { padding: 10px 12px; }
  .document-preview-modal .modal-title { gap: 6px; font-size: 15px; }
  .document-preview-modal .modal-header small { font-size: 9px; }
  .document-preview-workspace {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 7px 6px;
    padding: 8px 8px 6px;
    overflow-y: auto;
    background: #f5f8f5;
  }
  .document-preview-toolbar { display: contents; }
  .document-preview-toolbar fieldset {
    align-self: start;
    padding: 5px;
    border: 1px solid #dbe5dc;
    border-radius: 10px;
    background: #fff;
  }
  .document-preview-toolbar fieldset:first-child { grid-column: 1; grid-row: 1 / span 2; }
  #preview-duplex-controls { grid-column: 3; grid-row: 1; }
  #preview-orientation-controls { grid-column: 3; grid-row: 2; }
  .document-preview-toolbar legend {
    width: 100%;
    margin-bottom: 4px;
    padding: 0;
    font-size: 8px;
    line-height: 1.15;
    text-align: center;
  }
  .document-preview-toolbar .preview-segmented,
  #preview-duplex-controls .preview-segmented,
  #preview-orientation-controls .preview-segmented {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 3px;
    border-radius: 8px;
  }
  .document-preview-toolbar .preview-segmented button {
    display: grid;
    min-height: 35px;
    padding: 4px 2px;
    border-radius: 7px;
    font-size: 8px;
    line-height: 1.1;
    place-items: center;
  }
  .document-preview-toolbar .preview-segmented button i { font-size: 10px; }
  .document-preview-summary {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .document-preview-summary span {
    justify-content: center;
    min-width: 0;
    padding: 5px 3px;
    border-radius: 9px;
    font-size: 8px;
    line-height: 1.15;
    text-align: center;
  }
  .document-preview-workspace > .modal-body {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    min-width: 0;
    padding: 0;
    overflow: visible;
  }
  .document-sheet-preview { grid-template-columns: 1fr; gap: 12px; }
  .document-sheet-side { max-width: 100%; }
  .document-sheet-side > header { gap: 4px; font-size: 8px; }
  .document-sheet-side > header strong { font-size: 9px; }
  .document-sheet-grid { gap: 4px; padding: 7px; }
  .document-preview-modal .modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .document-preview-modal .modal-footer p { font-size: 8px; line-height: 1.25; }
  .document-preview-modal .modal-footer .button { min-width: 118px; min-height: 38px; padding: 7px 10px; font-size: 11px; }
  .page-picker-modal-content { border-radius: 22px; }
  .page-picker-modal .modal-header,
  .page-picker-modal .modal-footer { padding: 16px; }
  .page-picker-modal .modal-body { padding: 18px 16px; }
  .page-picker-modal .modal-title { font-size: 20px; }
  .page-picker-modal .input-group .btn { min-width: 96px; }
  .page-picker-card { grid-template-rows: 155px auto; }
  .page-picker-image-wrap { padding: 10px; }
  .confirm-payment-row { gap: 10px; }
  .button.confirm-payment-button { min-width: 205px; padding-right: 14px; padding-left: 14px; }
  .terms-consent-card { grid-template-columns: 1fr; gap: 2px; }
  .terms-open-button { justify-content: space-between; min-height: 46px; padding: 8px 10px; border-top: 1px solid #deeadf; border-radius: 0 0 10px 10px; }
  .terms-modal .modal-dialog { margin: 8px; }
  .terms-modal .modal-content { max-height: calc(100dvh - 16px); border-radius: 20px; }
  .terms-modal .modal-header { padding: 16px; }
  .terms-modal .modal-title { font-size: 20px; }
  .terms-modal-body { padding: 14px 14px 24px; }
  .terms-section { padding: 13px; }
  .terms-modal-footer { padding: 11px 14px; }
  .payment-card { padding: 14px; }
  .payment-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-summary-grid > .wide { grid-column: 1 / -1; }
  .qpay-bank-picker { display: block; }
  .payment-actions { grid-template-columns: 1fr; }
  .print-type-option {
    flex-direction: column;
    gap: 4px;
    min-height: 72px;
    padding: 20px 4px 7px;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
  }
  .print-type-badge { top: 5px; right: 5px; padding: 1px 5px; font-size: 8px; }
  .paper-size-choice-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .confirm-document-heading h1 { font-size: 14px; }
  .confirm-document-heading p { font-size: 11px; }
  .confirm-preview-panel { padding: 10px; }
  .confirm-settings-card { padding: 12px; }
  .qpay-bank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .print-type-options { gap: 5px; }
  .print-type-option { gap: 4px; padding: 20px 3px 6px; font-size: 9px; }
  .print-type-option-icon { width: 26px; height: 26px; font-size: 12px; }
  .print-type-badge { top: 5px; right: 5px; padding: 1px 4px; font-size: 8px; }
}
