/* Konoz certificate sheet — A4 landscape at 96 dpi (1123 × 794 px). See resources/views/certificates/sheet.blade.php */
.kzc-fit { position: relative; margin: 0 auto; max-width: 100%; }
.kzc-scale { transform-origin: 0 0; position: absolute; top: 0; left: 0; }
.kzc-fit.is-static { width: auto !important; height: auto !important; }
.kzc-fit.is-static .kzc-scale { position: static; transform: none !important; }

.kzc-sheet {
    --kzc-deep: #083a45; --kzc-teal: #0b4d5a; --kzc-teal2: #0F6D80; --kzc-gold: #b98a2b; --kzc-gold2: #d9a53a; --kzc-ink: #23303a;
    width: 1123px; height: 794px; position: relative; overflow: hidden; direction: rtl; text-align: center;
    font-family: 'Tajawal', Tahoma, sans-serif; color: var(--kzc-ink); background: var(--kzc-teal);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
/* Frame: teal border, ornamental band (gold stars on teal), gold double line, paper */
.kzc-ornament {
    position: absolute; inset: 12px;
    background-color: #0a4450;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath d='M13 3.5 15.2 9.6 21.5 8.5 17.4 13 21.5 17.5 15.2 16.4 13 22.5 10.8 16.4 4.5 17.5 8.6 13 4.5 8.5 10.8 9.6Z' fill='none' stroke='%23d9a53a' stroke-width='1.1'/%3E%3Ccircle cx='13' cy='13' r='1.6' fill='%23d9a53a'/%3E%3C/svg%3E");
    background-size: 26px 26px;
}
.kzc-paper {
    position: absolute; inset: 38px; background-color: #fffaf0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M32 10 38 22 51 17 46 30 58 32 46 34 51 47 38 42 32 54 26 42 13 47 18 34 6 32 18 30 13 17 26 22Z' fill='none' stroke='%23b98a2b' stroke-opacity='.07' stroke-width='1.2'/%3E%3C/svg%3E");
}
.kzc-line { position: absolute; pointer-events: none; }
.kzc-line-1 { inset: 38px; border: 3px solid var(--kzc-gold2); }
.kzc-line-2 { inset: 46px; border: 1px solid rgba(185, 138, 43, .75); }
.kzc-watermark { position: absolute; width: 330px; left: 50%; top: 50%; margin: -170px 0 0 -151px; opacity: .045; pointer-events: none; }
.kzc-corner { position: absolute; width: 74px; height: 74px; display: block; }
.kzc-corner-tr { top: 1px; right: 1px; } .kzc-corner-tl { top: 1px; left: 1px; }
.kzc-corner-br { bottom: 1px; right: 1px; } .kzc-corner-bl { bottom: 1px; left: 1px; }
.kzc-emblem { position: absolute; top: 66px; width: 82px; height: 82px; object-fit: contain; padding: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--kzc-gold2); box-shadow: 0 0 0 5px #fffaf0, 0 0 0 6px rgba(185, 138, 43, .55); }
.kzc-emblem-r { right: 78px; } .kzc-emblem-l { left: 78px; }

.kzc-top { position: absolute; top: 56px; left: 190px; right: 190px; }
.kzc-basmala { font-family: 'Amiri', serif; font-size: 23px; color: var(--kzc-deep); line-height: 1.4; }
.kzc-heading { font-family: 'Aref Ruqaa', 'Amiri', serif; font-weight: 700; font-size: 64px; line-height: 1.15; color: var(--kzc-gold); text-shadow: 0 1px 0 rgba(8, 58, 69, .12); }
.kzc-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 2px; }
.kzc-divider span { width: 110px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--kzc-gold2)); }
.kzc-divider span:last-child { background: linear-gradient(90deg, var(--kzc-gold2), transparent); }
.kzc-divider i { font-style: normal; font-size: 10px; color: var(--kzc-gold2); }

/* Text block centred between the heading and the signatures (content length varies by type). */
.kzc-body { position: absolute; top: 186px; bottom: 262px; left: 150px; right: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kzc-intro { font-size: 20px; font-weight: 700; color: #4a5a60; }
.kzc-name { font-family: 'Aref Ruqaa', 'Amiri', serif; font-weight: 700; font-size: 52px; line-height: 1.3; color: var(--kzc-teal2); padding: 0 46px 2px; border-bottom: 2px solid rgba(217, 165, 58, .7); margin-top: 4px; max-width: 820px; }
.kzc-action { font-size: 19px; font-weight: 700; color: #4a5a60; margin-top: 12px; }
.kzc-subject { margin-top: 8px; }
.kzc-subject span { display: inline-block; font-family: 'Amiri', serif; font-weight: 700; font-size: 28px; line-height: 1.45; color: var(--kzc-deep); padding: 2px 38px; border-radius: 40px; background: linear-gradient(90deg, rgba(217, 165, 58, 0), rgba(217, 165, 58, .2) 20%, rgba(217, 165, 58, .2) 80%, rgba(217, 165, 58, 0)); max-width: 760px; }
.kzc-detail { font-size: 16px; font-weight: 700; color: var(--kzc-deep); margin-top: 4px; }
.kzc-sanad { font-family: 'Amiri', serif; font-size: 13.5px; line-height: 1.7; color: #5b6b72; max-width: 720px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kzc-grade { font-size: 19px; font-weight: 700; color: #4a5a60; margin-top: 10px; }
.kzc-grade b { display: inline-block; font-size: 28px; color: var(--kzc-teal2); font-weight: 800; margin-inline-start: 6px; }
.kzc-phrase { font-family: 'Amiri', serif; font-size: 18.5px; line-height: 1.7; color: var(--kzc-deep); margin-top: 12px; max-width: 800px; }
.kzc-phrase i { font-style: normal; color: var(--kzc-gold2); }

/* Signatures: picture and seal side by side (never on top of each other) */
.kzc-foot { position: absolute; left: 84px; right: 84px; bottom: 60px; display: flex; align-items: flex-end; justify-content: space-between; }
.kzc-sign { width: 270px; text-align: center; }
.kzc-sign-art { height: 82px; display: flex; align-items: flex-end; justify-content: center; gap: 10px; }
.kzc-sign-img { max-width: 170px; max-height: 70px; object-fit: contain; }
.kzc-seal-img { width: 74px; height: 74px; object-fit: contain; opacity: .92; transform: rotate(-8deg); }
.kzc-sign-name { border-top: 1.5px solid rgba(35, 48, 58, .4); margin-top: 4px; padding-top: 6px; font-family: 'Aref Ruqaa', 'Amiri', serif; font-weight: 700; font-size: 22px; color: var(--kzc-deep); line-height: 1.3; }
.kzc-sign-title { font-size: 14px; font-weight: 700; color: var(--kzc-gold); }

.kzc-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kzc-platform-mark { position: relative; height: 92px; display: flex; align-items: center; justify-content: center; }
.kzc-platform-seal { width: 92px; height: 92px; object-fit: contain; }
.kzc-platform-sign { position: absolute; max-width: 140px; max-height: 56px; bottom: -4px; left: 58%; object-fit: contain; }
.kzc-seal-default { border-radius: 50%; border: 3px double var(--kzc-gold2); background: #fff; display: flex; align-items: center; justify-content: center; padding: 12px; box-shadow: 0 0 0 4px #fffaf0, 0 0 0 5px rgba(185, 138, 43, .5); }
.kzc-seal-default img { width: 100%; height: 100%; object-fit: contain; }
.kzc-verify { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid rgba(11, 77, 90, .3); border-radius: 10px; padding: 5px 8px 5px 12px; }
.kzc-qr { width: 64px; height: 64px; flex-shrink: 0; }
.kzc-qr canvas, .kzc-qr img { display: block; width: 64px !important; height: 64px !important; }
.kzc-verify-text { text-align: start; line-height: 1.3; }
.kzc-verify-text small { display: block; font-size: 11px; font-weight: 700; color: #5b6b72; }
.kzc-verify-text b { display: block; font-size: 16px; font-weight: 800; letter-spacing: 1px; color: var(--kzc-teal); unicode-bidi: isolate; }
.kzc-date { font-size: 13px; font-weight: 700; color: #4a5a60; }

/* Uploaded certificate picture + verification QR */
.kzc-photo { width: 1123px; position: relative; background: #fff; padding: 14px; }
.kzc-photo > img { display: block; width: 100%; border-radius: 6px; }
.kzc-photo-qr { position: absolute; bottom: 26px; left: 26px; background: #fff; border-radius: 10px; padding: 6px; text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.kzc-photo-qr b { display: block; font-size: 11px; letter-spacing: .5px; color: #0b4d5a; margin-top: 3px; }

/* Export toolbar (PDF / image / print) */
.kzc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.kzc-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 22px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; line-height: 1.2; }
.kzc-btn:disabled { opacity: .65; cursor: wait; }
.kzc-btn-gold { background: linear-gradient(135deg, #D89B1D, #e8ab2c); color: #fff; box-shadow: 0 8px 20px rgba(216,155,29,.3); }
.kzc-btn-teal { background: linear-gradient(135deg, #0F6D80, #157a8c); color: #fff; }
.kzc-btn-ghost { background: #fff; color: #0F6D80; border: 1.5px solid rgba(15,109,128,.25); }
.kzc-btn-gold:hover, .kzc-btn-teal:hover { color: #fff; }

#kzcPrintRoot { display: none; }
@media print {
    @page { size: A4 landscape; margin: 0; }
    html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; min-width: 0 !important; }
    body.kzc-printing > *:not(#kzcPrintRoot) { display: none !important; }
    body.kzc-printing #kzcPrintRoot { display: flex; align-items: center; justify-content: center; width: 297mm; height: 209mm; overflow: hidden; }
    #kzcPrintRoot .kzc-photo { width: auto; padding: 0; }
    #kzcPrintRoot .kzc-photo > img { width: auto; max-width: 297mm; max-height: 209mm; border-radius: 0; }
}
