/* Reference-matched Siskul certificate renderer. The artwork is the blank
   certificate supplied by the academy; every learner detail is overlaid from
   the certificate record so one course never leaks into another. */
.certificate-sheet {
  position: relative;
  width: 100%;
  max-width: 1220px;
  aspect-ratio: 1600 / 1066;
  container-type: inline-size;
  container-name: certificate-sheet;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 198, 75, .68);
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 38px rgba(205, 24, 25, .2);
}

.certificate-template {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.certificate-photo-slot {
  position: absolute;
  top: 6.285%;
  left: 3.75%;
  width: 11.4375%;
  aspect-ratio: 1;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* The supplied 1600 × 1066 artwork has a 5 px inner inset inside its
     183 px photo frame. Percentage padding is relative to the certificate
     sheet (not this slot), so .3125% is the exact 5 px inset at the source
     canvas size. This keeps the red artwork stroke visible and makes the
     cropped learner square fill the whole white placeholder. */
  padding: .3125%;
  border: 0;
  background: transparent;
}

.certificate-photo-slot img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.certificate-photo-slot #certStudentPhoto:not(.is-visible) { display: none; }

.certificate-photo-slot #certPhotoPlaceholder {
  color: #a50000;
  font-size: clamp(3px, 2.2cqw, 2.2rem);
}

.certificate-copy {
  position: absolute;
  inset: 0 7.5%;
  height: 100%;
  display: block;
  text-align: center;
  color: #17100b;
  font-family: Georgia, "Times New Roman", serif;
}

.certificate-to-certify {
  position: absolute;
  top: 34.05%;
  left: 0;
  width: 100%;
  margin: 0;
  font-size: clamp(4px, 1.55cqw, 1.75rem);
  line-height: 1.05;
  white-space: nowrap;
}

.certificate-copy h1 {
  position: absolute;
  top: 37.55%;
  left: 0;
  width: 100%;
  height: 7.1%;
  max-width: 100%;
  margin: 0;
  color: #bd831a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(7px, 4cqw, 3.8rem);
  font-weight: 800;
  line-height: .98;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.certificate-article {
  position: absolute;
  left: 0;
  width: 100%;
  height: 6.25%;
  max-width: 100%;
  max-height: 6.25%;
  margin: 0;
  font-size: clamp(3.5px, 1.12cqw, 1.32rem);
  line-height: 1.1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-wrap: balance;
}

#certArticleIntro {
  top: 48%;
  height: 4.5%;
  max-height: 4.5%;
  -webkit-line-clamp: 1;
  white-space: nowrap;
}
#certArticleProficiency { top: 51.55%; -webkit-line-clamp: 1; white-space: nowrap; }
#certArticleAward { top: 56.1%; }

.certificate-article-strong {
  font-weight: 700;
}

.certificate-date-block {
  position: absolute;
  z-index: 3;
  top: 63.05%;
  left: 38.7%;
  width: 23%;
  display: grid;
  gap: .35cqw;
  color: #a82425;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5px, .95cqw, 1.05rem);
  line-height: 1.1;
}

.certificate-date-block div {
  display: grid;
  grid-template-columns: 52% auto;
  gap: 2%;
  white-space: nowrap;
}

.certificate-date-block strong { font-weight: 500; }

.certificate-signature {
  position: absolute;
  z-index: 1;
  top: 65.5%;
  height: 22%;
  width: 23%;
  color: #b20d12;
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
  display: grid;
  grid-template-rows: 55% 1px 25% 19%;
  align-items: start;
}

.certificate-signature-left { left: 18.5%; }
.certificate-signature-right { right: 20%; }

.certificate-signature-art {
  display: block;
  width: 84%;
  height: 100%;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}

.certificate-signature-art-mentor { width: 78%; }

.certificate-signature span {
  display: block;
  width: 100%;
  height: 1px;
  margin: 0;
  border-top: 1px dashed rgba(117, 81, 14, .75);
}

.certificate-signature strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(5px, 1.75cqw, 1.95rem);
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.certificate-signature small {
  display: flex;
  align-items: start;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #22150e;
  font-size: clamp(3.5px, 1.06cqw, 1.18rem);
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.certificate-id-chip {
  position: absolute;
  right: 3.8%;
  bottom: 2.9%;
  z-index: 2;
  color: rgba(46, 24, 5, .76);
  font: 600 clamp(3px, .58cqw, .7rem)/1 "DM Mono", monospace;
  letter-spacing: .04em;
}

.certificate-public-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(38px, 6vw, 92px) 0 120px;
}

.certificate-page-head {
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.certificate-page-head h1 {
  max-width: 100%;
  margin: 0;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: .88;
  letter-spacing: -.08em;
}

.certificate-page-head h1 span { color: var(--red-bright); }
.certificate-page-head p:last-child { margin: 15px 0 0; color: var(--muted); font-size: .8rem; }

.certificate-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(22, 245, 110, .4);
  border-radius: 999px;
  color: #c8ffda;
  background: rgba(22, 245, 110, .06);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.certificate-verified-badge i { color: var(--green); }

.certificate-public-card {
  min-width: 0;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid rgba(255, 42, 52, .32);
  border-radius: 22px;
  background: rgba(20, 3, 5, .78);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .35);
}

.certificate-public-card .certificate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  margin-top: clamp(24px, 3vw, 40px);
  padding-top: 4px;
}

.certificate-public-card .certificate-actions .btn {
  max-width: 100%;
  min-width: 148px;
  min-height: 52px;
  padding: 14px 22px;
  font-size: .82rem;
  line-height: 1.1;
  white-space: nowrap;
}

.certificate-verification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 200, 87, .22);
  border-radius: 12px;
  color: #d7c8ab;
  background: rgba(255, 200, 87, .04);
  font-size: .68rem;
}

.certificate-verification-meta span { color: #c9ffda; }
.certificate-verification-meta i { margin-right: 5px; color: var(--green); }
.certificate-verification-meta strong { color: var(--gold); font-family: "DM Mono", monospace; }
.certificate-verification-meta small { max-width: 44%; overflow: hidden; color: #927d7d; text-overflow: ellipsis; white-space: nowrap; }

/* html2canvas uses the normal screen stylesheet rather than the print
   stylesheet. Keep the artwork at the exact certificate size while removing
   screen-only clipping from the overlaid text before making a PDF. */
.certificate-sheet.certificate-pdf-capture .certificate-copy,
.certificate-sheet.certificate-pdf-capture .certificate-copy * {
  background: transparent !important;
}

.certificate-sheet.certificate-pdf-capture .certificate-copy h1,
.certificate-sheet.certificate-pdf-capture .certificate-article,
.certificate-sheet.certificate-pdf-capture .certificate-signature strong,
.certificate-sheet.certificate-pdf-capture .certificate-signature small {
  overflow: visible !important;
  text-overflow: clip !important;
}

.certificate-sheet.certificate-pdf-capture .certificate-copy h1 {
  height: 8% !important;
  line-height: 1 !important;
}

.certificate-sheet.certificate-pdf-capture .certificate-article {
  max-height: none !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
}

@media (max-width: 850px) {
  .certificate-date-block div { grid-template-columns: 52% auto; }
  .certificate-verification-meta { align-items: start; flex-wrap: wrap; }
  .certificate-verification-meta small { max-width: 100%; flex-basis: 100%; }
}

@media (max-width: 600px) {
  .certificate-page-head { display: block; }
  .certificate-verified-badge { margin-top: 20px; }
  .certificate-public-card .certificate-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
  }
  .certificate-public-card .certificate-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding-inline: 10px;
    font-size: .72rem;
    justify-content: center;
  }
  .certificate-public-card .certificate-actions .btn:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }
  .certificate-verification-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .certificate-verification-meta small {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .certificate-public-card .certificate-actions {
    grid-template-columns: 1fr;
  }
  .certificate-public-card .certificate-actions .btn:last-child:nth-child(3) {
    grid-column: auto;
  }
}

@page certificate-public {
  size: landscape;
  margin: 0;
}

@media print {
  html,
  body {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.certificate-public-body {
    page: certificate-public;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.certificate-public-body .site-shell {
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  body.certificate-public-body .site-shell::before,
  body.certificate-public-body .site-shell::after,
  body.certificate-public-body .orb,
  body.certificate-public-body .noise,
  body.certificate-public-body .skip-link,
  body.certificate-public-body .navbar,
  body.certificate-public-body .mobile-bottom-bar,
  body.certificate-public-body .footer,
  body.certificate-public-body .page-footer,
  body.certificate-public-body .chat-dock,
  body.certificate-public-body .toast-region,
  body.certificate-public-body .certificate-page-head,
  body.certificate-public-body .certificate-actions,
  body.certificate-public-body .certificate-verification-meta {
    display: none !important;
  }

  body.certificate-public-body #main-content,
  body.certificate-public-body .certificate-public-page,
  body.certificate-public-body .certificate-public-page > .container,
  body.certificate-public-body .certificate-public-card {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  body.certificate-public-body .certificate-sheet {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Overlay copy is transparent. The supplied certificate artwork remains the
     only background, so print cannot paint white rectangles over the text. */
  body.certificate-public-body .certificate-copy,
  body.certificate-public-body .certificate-copy * {
    background: transparent !important;
  }

  body.certificate-public-body .certificate-copy h1,
  body.certificate-public-body .certificate-article,
  body.certificate-public-body .certificate-signature strong,
  body.certificate-public-body .certificate-signature small {
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body.certificate-public-body .certificate-copy h1 {
    height: 8% !important;
    line-height: 1 !important;
  }

  body.certificate-public-body .certificate-article {
    max-height: none !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
  }
}

/* Certificate owner editor */
.certificate-edit-page { min-height: 75vh; padding: 90px 0 110px; }
.certificate-edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr); align-items: center; gap: 70px; }
.certificate-edit-intro h1 { max-width: 700px; margin: 12px 0 18px; color: #fff; font-family: "Space Grotesk", sans-serif; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .88; letter-spacing: -.08em; }
.certificate-edit-intro h1 span { color: var(--green); text-shadow: 0 0 22px rgba(22, 245, 110, .32); }
.certificate-edit-intro > p:not(.eyebrow) { max-width: 580px; margin: 0 0 25px; color: var(--muted); line-height: 1.75; }
.certificate-edit-card { padding: 28px; border: 1px solid rgba(32, 217, 138, .35); border-radius: 20px; background: linear-gradient(145deg, rgba(4, 34, 22, .72), rgba(7, 5, 9, .96)); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.certificate-edit-course { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; padding: 14px; border: 1px solid rgba(32, 217, 138, .22); border-radius: 12px; background: rgba(32, 217, 138, .06); }
.certificate-edit-course > i { color: var(--green); font-size: 1.3rem; }
.certificate-edit-course small, .certificate-edit-course strong { display: block; }
.certificate-edit-course small { color: #86cda5; font-family: "DM Mono", monospace; font-size: .57rem; letter-spacing: .1em; text-transform: uppercase; }
.certificate-edit-course strong { margin-top: 4px; color: #fff; font-size: .8rem; }
.certificate-edit-field { display: grid; gap: 8px; margin-top: 17px; color: #d7efdf; font-size: .7rem; font-weight: 800; }
.certificate-edit-field input, .certificate-edit-field select { width: 100%; padding: 13px 14px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 9px; outline: 0; color: #fff; background: rgba(0, 0, 0, .25); font: inherit; }
.certificate-edit-field input:focus, .certificate-edit-field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22, 245, 110, .1); }
.certificate-edit-field select option { color: #fff; background: #130a0e; }
.certificate-edit-note { display: flex; gap: 8px; margin: 19px 0; color: #a8c2b0; font-size: .64rem; line-height: 1.5; }
.certificate-edit-note i { color: var(--green); }
.certificate-edit-card > .btn { width: 100%; justify-content: center; color: #04170c; background: linear-gradient(135deg, #5af0aa, #0c995d); border-color: #7bffc2; }
.certificate-edit-errors { padding: 10px 13px; border: 1px solid rgba(255, 76, 76, .5); border-radius: 9px; color: #ffadad; background: rgba(130, 0, 0, .18); font-size: .67rem; }
.certificate-edit-errors p { margin: 4px 0; }
.certificate-edit-errors i { margin-right: 5px; color: #ff5c5c; }

/* Learner generation form. The certificate artwork stays the exact supplied
   reference; this surrounding UI only makes the editable controls clear. */
.certificate-create-page { min-height: 78vh; padding: clamp(58px, 8vw, 105px) 0 120px; }
.certificate-create-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .78fr); align-items: center; gap: clamp(28px, 6vw, 82px); }
.certificate-create-intro h1 { max-width: 720px; margin: 12px 0 18px; color: #fff; font-family: "Space Grotesk", sans-serif; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .88; letter-spacing: -.08em; }
.certificate-create-intro h1 span { color: var(--red-bright); text-shadow: var(--glow); }
.certificate-create-intro > p:not(.eyebrow) { max-width: 620px; margin: 0 0 25px; color: var(--muted); font-size: .96rem; line-height: 1.75; }
.certificate-create-reference { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 15px; max-width: 620px; margin: 0 0 25px; padding: 12px; border: 1px solid rgba(255, 200, 87, .28); border-radius: 15px; background: rgba(255, 200, 87, .045); }
.certificate-create-reference img { display: block; width: 100%; aspect-ratio: 1600 / 1066; object-fit: cover; border: 1px solid rgba(255, 200, 87, .45); border-radius: 9px; }
.certificate-create-reference strong, .certificate-create-reference small { display: block; }
.certificate-create-reference strong { color: #ffe5a7; font-size: .82rem; line-height: 1.35; }
.certificate-create-reference strong i { margin-right: 5px; color: var(--gold); }
.certificate-create-reference small { margin-top: 7px; color: #bca88c; font-size: .74rem; line-height: 1.5; }
.certificate-create-card { align-self: stretch; }
.certificate-create-card fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.certificate-create-card fieldset:disabled { opacity: .8; }
.certificate-create-card fieldset > .btn { width: 100%; justify-content: center; margin-top: 21px; }
.certificate-file-help { color: #a8c2b0; font-size: .72rem; font-weight: 500; line-height: 1.45; }
.certificate-edit-field input[type="file"] { padding: 9px; color: #d9caca; }
.certificate-edit-field input[type="file"]::file-selector-button { margin-right: 11px; padding: 10px 13px; border: 1px solid #ff5656; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #ff3434, #b80000); font: 800 .78rem "Manrope", sans-serif; cursor: pointer; }
.certificate-edit-field input[type="file"]::file-selector-button:hover { background: linear-gradient(135deg, #ff5555, #d00000); box-shadow: var(--glow); }
.certificate-photo-preview { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 84px; margin-top: 14px; padding: 10px; border: 1px dashed rgba(22, 245, 110, .42); border-radius: 11px; color: #a8c2b0; background: rgba(22, 245, 110, .035); font-size: .74rem; line-height: 1.45; }
.certificate-photo-preview img { display: block; width: 84px; height: 84px; object-fit: cover; border: 1px solid var(--green); border-radius: 8px; }
.certificate-photo-preview i { display: grid; width: 84px; height: 84px; place-items: center; border: 1px dashed rgba(22, 245, 110, .42); border-radius: 8px; color: var(--green); font-size: 1.2rem; }
.certificate-photo-preview-empty { grid-template-columns: 84px 1fr; }
.certificate-photo-preview > span { min-width: 0; }
.certificate-photo-adjust { align-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(22, 245, 110, .45); border-radius: 8px; color: #c7ffda; background: rgba(22, 245, 110, .07); font: 800 .66rem "Manrope", sans-serif; cursor: pointer; }
.certificate-photo-adjust:hover { border-color: var(--green); color: #07180d; background: var(--green); }

/* The crop studio uses the same square ratio as the certificate photo slot.
   The canvas is the source of truth: the file submitted to Django is made
   from the exact visible square after the learner presses Apply crop. */
.certificate-crop-modal { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 18px; }
.certificate-crop-modal[hidden] { display: none; }
.certificate-crop-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .82); backdrop-filter: blur(9px); }
.certificate-crop-dialog { position: relative; z-index: 1; width: min(1040px, 100%); max-height: min(850px, calc(100vh - 36px)); overflow: auto; border: 1px solid rgba(255, 42, 52, .78); border-radius: 20px; background: linear-gradient(145deg, rgba(34, 2, 7, .98), rgba(7, 7, 9, .98)); box-shadow: 0 0 0 1px rgba(22, 245, 110, .08), 0 24px 100px rgba(0, 0, 0, .72), 0 0 42px rgba(255, 42, 52, .24); }
.certificate-crop-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 19px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.certificate-crop-header .eyebrow { margin: 0 0 9px; color: #ff5961; }
.certificate-crop-header h2 { margin: 0; color: #fff; font: 800 clamp(1.7rem, 4vw, 2.8rem)/.95 "Space Grotesk", sans-serif; letter-spacing: -.06em; }
.certificate-crop-header h2::first-letter { color: #fff; }
.certificate-crop-header p:last-child { max-width: 650px; margin: 10px 0 0; color: #bcaeb0; font-size: .78rem; line-height: 1.55; }
.certificate-crop-close { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255, 255, 255, .17); border-radius: 10px; color: #fff; background: rgba(0, 0, 0, .24); cursor: pointer; }
.certificate-crop-close:hover { border-color: #ff5961; color: #fff; background: rgba(180, 0, 12, .42); }
.certificate-crop-body { display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(240px, .7fr); align-items: center; gap: 25px; padding: 24px 26px 27px; }
.certificate-crop-stage-wrap { min-width: 0; }
.certificate-crop-stage { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border: 1px solid rgba(22, 245, 110, .55); border-radius: 12px; background: #050506; box-shadow: inset 0 0 0 1px rgba(255, 42, 52, .2), 0 0 28px rgba(22, 245, 110, .1); }
.certificate-crop-stage::after { position: absolute; pointer-events: none; content: ""; inset: 8px; border: 1px dashed rgba(255, 255, 255, .55); border-radius: 5px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .08); }
.certificate-crop-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.certificate-crop-stage canvas.is-dragging { cursor: grabbing; }
.certificate-crop-frame-label { position: absolute; z-index: 2; right: 12px; bottom: 10px; padding: 5px 7px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 5px; color: rgba(255, 255, 255, .72); background: rgba(0, 0, 0, .45); font: 700 .52rem "DM Mono", monospace; letter-spacing: .12em; }
.certificate-crop-hint { margin: 10px 0 0; color: #9caea1; font-size: .68rem; text-align: center; }
.certificate-crop-hint i { margin-right: 5px; color: var(--green); }
.certificate-crop-tools { min-width: 0; padding: 19px; border: 1px solid rgba(22, 245, 110, .23); border-radius: 14px; background: rgba(22, 245, 110, .035); }
.certificate-crop-tool-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #effff4; font-size: .78rem; font-weight: 800; }
.certificate-crop-tool-heading output { color: var(--green); font: 800 .74rem "DM Mono", monospace; }
.certificate-crop-zoom-label { display: block; margin-top: 24px; color: #b9d5c2; font-size: .68rem; font-weight: 800; }
.certificate-crop-zoom { width: 100%; margin: 13px 0 3px; accent-color: var(--red-bright); cursor: pointer; }
.certificate-crop-status { min-height: 42px; margin: 17px 0 0; padding: 11px 12px; border-left: 2px solid var(--green); color: #a9c8b3; background: rgba(0, 0, 0, .2); font-size: .67rem; line-height: 1.5; }
.certificate-crop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 19px; }
.certificate-crop-actions .btn { min-height: 42px; justify-content: center; padding: 10px 11px; font-size: .68rem; }
.certificate-crop-actions [data-certificate-crop-apply] { grid-column: 1 / -1; color: #06150c; background: linear-gradient(135deg, #60f2ad, #0ba563); border-color: #8affc5; }
.certificate-crop-actions [data-certificate-crop-apply]:hover { box-shadow: 0 0 22px rgba(22, 245, 110, .32); }
body.certificate-crop-open { overflow: hidden; }

@media (max-width: 800px) {
  .certificate-edit-page { padding: 60px 0 80px; }
  .certificate-edit-layout { grid-template-columns: 1fr; gap: 35px; }
  .certificate-create-page { padding: 60px 0 80px; }
  .certificate-create-layout { grid-template-columns: 1fr; gap: 35px; }
  .certificate-create-reference { max-width: none; }
}

@media (max-width: 520px) {
  .certificate-create-reference { grid-template-columns: 120px 1fr; }
  .certificate-create-card { padding: 20px; }
  .certificate-photo-preview { grid-template-columns: 64px minmax(0, 1fr); gap: 9px; }
  .certificate-photo-preview img, .certificate-photo-preview i { width: 64px; height: 64px; }
  .certificate-photo-adjust { grid-column: 2; justify-self: start; }
  .certificate-crop-modal { padding: 8px; }
  .certificate-crop-header { padding: 18px 17px 15px; }
  .certificate-crop-body { grid-template-columns: 1fr; gap: 15px; padding: 17px; }
  .certificate-crop-stage { width: min(100%, 430px); }
  .certificate-crop-tools { padding: 15px; }
}
