.picm-form {
  max-width: 920px;
  margin: 24px auto;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.picm-verify-form {
  max-width: 920px;
  margin: 24px auto 14px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.picm-verify-form h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.picm-verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.picm-verify-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.picm-form h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.picm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.picm-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.picm-form input,
.picm-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.picm-field-wide {
  grid-column: 1 / -1;
}

.picm-button,
.picm-print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #fff;
  background: #e21d2f;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.picm-print-actions {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.picm-alert {
  max-width: 920px;
  margin: 20px auto;
  padding: 14px 16px;
  border-radius: 6px;
  font-weight: 700;
}

.picm-alert-success {
  color: #065f46;
  background: #d1fae5;
}

.picm-alert-error {
  color: #991b1b;
  background: #fee2e2;
}

.picm-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  background: #6b7280;
  font-weight: 700;
}

.picm-status-approved {
  background: #059669;
}

.picm-status-pending {
  background: #f59e0b;
}

.picm-status-rejected,
.picm-status-blocked,
.picm-status-expired {
  background: #dc2626;
}

.picm-print-body,
.picm-verify-body {
  margin: 0;
  background: #f3f4f6;
  color: #111827;
  font-family: Arial, sans-serif;
}

.picm-theme-page {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 28px 16px;
}

.picm-print-body *,
.picm-print-body *::before,
.picm-print-body *::after,
.picm-verify-body *,
.picm-verify-body *::before,
.picm-verify-body *::after {
  box-sizing: border-box;
}

.picm-print-button {
  margin: 0;
}

.picm-verify-button {
  background: #111827;
}

.picm-card-page {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  padding: 80px 24px 24px;
}

.picm-id-card {
  position: relative;
  width: 214px;
  height: 338px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(17, 24, 39, .18);
}

.picm-front {
  padding-left: 45px;
}

.picm-id-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(17, 24, 39, .16);
  border-radius: inherit;
  pointer-events: none;
}

.picm-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 54px;
  padding: 8px 10px;
  color: #fff;
  background: var(--picm-dark, #111827);
  text-align: left;
}

.picm-front .picm-card-top {
  min-height: 78px;
  padding: 12px 10px 4px;
  color: var(--picm-dark, #111827);
  background: #fff;
  text-align: center;
}

.picm-card-top img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}

.picm-front .picm-card-top img,
.picm-back-head img {
  width: 142px;
  height: 58px;
  border-radius: 0;
  object-fit: contain;
}

.picm-front .picm-card-top div {
  display: none;
}

.picm-card-top strong,
.picm-back-head strong {
  display: block;
  font-size: 13px;
  line-height: 1.1;
}

.picm-card-top span,
.picm-back-head span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  opacity: .88;
}

.picm-press-band {
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--picm-primary, #e21d2f);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 3px;
}

.picm-front .picm-press-band {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 45px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  color: #fff;
  background: var(--picm-primary, #c91524);
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.picm-front .picm-press-band span {
  display: block;
}

.picm-front-body {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 12px 6px;
  text-align: center;
}

.picm-front .picm-front-body {
  padding: 8px 12px 0;
}

.picm-photo {
  width: 92px;
  height: 108px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--picm-primary, #e21d2f);
  border-radius: 8px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}

.picm-front .picm-photo {
  width: 104px;
  height: 128px;
  border: 0;
  border-radius: 0;
  background: var(--picm-primary, #c91524);
}

.picm-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picm-member-main h2 {
  margin: 0;
  color: var(--picm-dark, #111827);
  font-size: 18px;
  line-height: 1.1;
}

.picm-front .picm-member-main h2 {
  margin-top: 8px;
  color: #050505;
  font-size: 17px;
  font-weight: 900;
}

.picm-member-main p {
  margin: 3px 0;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.picm-front .picm-member-main p {
  margin: 2px 0 0;
  color: #050505;
  font-size: 16px;
  font-weight: 900;
}

.picm-front .picm-member-main p + p,
.picm-front .picm-card-bottom,
.picm-front .picm-watermark {
  display: none;
}

.picm-front-details,
.picm-front .picm-front-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 3px;
  width: 100%;
  margin: 7px 0 0;
  color: #000;
  text-align: left;
}

.picm-front-details dt,
.picm-front-details dd {
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.18;
  color: #000;
}

.picm-front-details dd {
  overflow-wrap: anywhere;
  word-break: normal;
}

.picm-member-main dl {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 3px 6px;
  margin: 9px auto 0;
  font-size: 10px;
  text-align: left;
  width: 172px;
}

.picm-member-main dt {
  color: #6b7280;
}

.picm-member-main dd {
  margin: 0;
  font-weight: 700;
}

.picm-card-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 12px 10px;
}

.picm-card-bottom > img,
.picm-back-footer > img {
  width: 54px;
  height: 54px;
}

.picm-card-bottom div {
  display: grid;
  justify-items: end;
  color: #374151;
  font-size: 9px;
  font-weight: 700;
}

.picm-sign {
  width: 78px;
  height: 24px;
  object-fit: contain;
}

.picm-watermark {
  position: absolute;
  right: -35px;
  bottom: 70px;
  transform: rotate(-28deg);
  color: rgba(226, 29, 47, .12);
  font-size: 42px;
  font-weight: 900;
  pointer-events: none;
}

.picm-back {
  padding: 0;
}

.picm-back-head {
  min-height: 96px;
  padding: 10px 14px 0;
  color: var(--picm-dark, #111827);
  background: #fff;
  text-align: center;
}

.picm-back-head strong,
.picm-back-head span {
  display: none;
}

.picm-back-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 12px 14px 8px;
  font-size: 10px;
}

.picm-back .picm-back-grid {
  display: none;
}

.picm-back-grid span {
  color: #6b7280;
}

.picm-back-grid strong {
  min-width: 0;
  color: #111827;
  margin-bottom: 4px;
  word-break: break-word;
}

.picm-terms {
  min-height: 182px;
  margin: 0 10px 0;
  padding: 0;
  border-left: 0;
  background: #fff;
  color: #050505;
  font-size: 7.7px;
  font-weight: 800;
  line-height: 1.33;
  white-space: normal;
}

.picm-back-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 6px 10px;
  color: #050505;
  background: var(--picm-primary, #c91524);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.picm-back-footer > img {
  width: 32px;
  height: 32px;
  padding: 2px;
  background: #fff;
}

.picm-back-footer span {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-align: center;
}

.picm-back-footer small {
  display: block;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.05;
}

.picm-stamp {
  width: 58px;
  height: 42px;
  object-fit: contain;
  opacity: .9;
}

.picm-verify-box {
  max-width: 460px;
  margin: 60px auto;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .12);
}

.picm-verify-box h1 {
  margin-top: 0;
}

.picm-verified-card {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, .08);
}

.picm-verified-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #fff;
  background: var(--picm-primary, #e21d2f);
  font-size: 15px;
  font-weight: 900;
}

.picm-verified-head img {
  width: 110px;
  max-height: 46px;
  object-fit: contain;
  padding: 4px;
  border-radius: 6px;
  background: #fff;
}

.picm-verified-body {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.picm-verified-photo {
  width: 116px;
  height: 142px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--picm-primary, #e21d2f);
  border-radius: 8px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.picm-verified-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picm-verified-body dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
  align-content: start;
}

.picm-verified-body dt,
.picm-verified-body dd {
  margin: 0;
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}

.picm-verified-body dt {
  color: #6b7280;
  font-weight: 800;
}

.picm-verified-body dd {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.picm-verify-status {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: #6b7280;
  font-weight: 800;
}

/* Final print size: portrait ID card, 54mm x 86mm. */
.picm-id-card {
  width: 54mm;
  height: 86mm;
  border-radius: 3mm;
}

.picm-front {
  padding-left: 11.3mm;
}

.picm-front .picm-card-top {
  min-height: 19.8mm;
  padding: 3mm 2.5mm 1mm;
}

.picm-front .picm-card-top img,
.picm-back-head img {
  width: 36mm;
  height: 14.8mm;
}

.picm-front .picm-press-band {
  width: 11.3mm;
  padding: 2mm 0;
  font-size: 12.5mm;
}

.picm-front .picm-front-body {
  gap: 1.4mm;
  padding: 1.3mm 3mm 0;
}

.picm-front .picm-photo {
  width: 22mm;
  height: 27mm;
}

.picm-front .picm-member-main h2 {
  margin-top: 2mm;
  font-size: 4.3mm;
}

.picm-front .picm-member-main p {
  margin-top: .7mm;
  font-size: 4mm;
}

.picm-front .picm-front-details {
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .45mm .7mm;
  margin-top: 1.2mm;
}

.picm-front .picm-front-details dt,
.picm-front .picm-front-details dd {
  font-size: 10px;
  line-height: 1.16;
  color: #000;
}

.picm-back-head {
  min-height: 24.4mm;
  padding: 2.5mm 3.6mm 0;
}

.picm-terms {
  min-height: 46.2mm;
  margin: 0 2.5mm;
  font-size: 1.95mm;
  line-height: 1.34;
}

.picm-back-footer {
  min-height: 13.6mm;
  padding: 1.4mm 2.2mm;
  font-size: 3.1mm;
}

.picm-back-footer > img {
  width: 8.4mm;
  height: 8.4mm;
}

.picm-back-footer span {
  font-size: 3.05mm;
  line-height: 1.14;
  color: #fff;
}

.picm-back-footer small {
  font-size: 2mm;
  line-height: 1.05;
}

.picm-stamp {
  width: 14.7mm;
  height: 10.7mm;
}

@media (max-width: 720px) {
  .picm-form-grid {
    grid-template-columns: 1fr;
  }

  .picm-verify-row {
    grid-template-columns: 1fr;
  }

  .picm-verified-body {
    grid-template-columns: 1fr;
  }

  .picm-verified-photo {
    margin: 0 auto;
  }

  .picm-card-page {
    padding: 70px 12px 18px;
  }

  .picm-id-card {
    max-width: calc(100vw - 24px);
    height: auto;
    aspect-ratio: 54 / 86;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  .picm-print-actions {
    display: none;
  }

  .picm-card-page {
    padding: 12mm;
    gap: 8mm;
  }

  .picm-id-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
