/* HR document template DEMO preview (assets/hr/template-preview.js). A4 white page on a light-grey stage; print = A4 pages only. */
.tp-btn-row { margin-right: 6px; }
.tp-open { overflow: hidden; }
.tp-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: #e5e7eb; color: #111827; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.tp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; background: #1f2937; color: #fff; }
.tp-bar-title { flex: 1 1 220px; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-bar-title small { display: block; font-weight: 400; font-size: 11px; color: #cbd5e1; }
.tp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tp-tools button { min-height: 36px; min-width: 36px; padding: 6px 10px; border: 1px solid #475569; border-radius: 6px; background: #334155; color: #fff; font-size: 13px; cursor: pointer; line-height: 1.1; }
.tp-tools button:hover:not(:disabled) { background: #475569; }
.tp-tools button:disabled { opacity: .4; cursor: not-allowed; }
.tp-tools button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.tp-tools .tp-primary { background: #2563eb; border-color: #2563eb; }
.tp-tools .tp-primary:hover:not(:disabled) { background: #1d4ed8; }
.tp-tools .tp-close { background: #7f1d1d; border-color: #991b1b; }
.tp-short { display: none; }
.tp-zoom { min-width: 46px; text-align: center; font-size: 13px; }
.tp-sep { width: 1px; height: 22px; background: #475569; }
.tp-banner { padding: 6px 12px; background: #fef3c7; color: #78350f; font-size: 12px; border-bottom: 1px solid #fde68a; }
.tp-notice { padding: 6px 12px; background: #eff6ff; color: #1e3a8a; font-size: 12px; border-bottom: 1px solid #bfdbfe; }
.tp-error { margin: 32px auto; max-width: 420px; padding: 20px; background: #fff; border-radius: 8px; text-align: center; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.tp-error button { margin-top: 12px; padding: 8px 16px; border: 0; border-radius: 6px; background: #2563eb; color: #fff; cursor: pointer; }
.tp-stage { flex: 1 1 auto; overflow: auto; padding: 16px 8px 32px; -webkit-overflow-scrolling: touch; }
.tp-scaler { margin: 0 auto; position: relative; }
.tp-pages { position: absolute; top: 0; left: 0; width: 794px; transform-origin: top left; }
.tp-page { position: relative; width: 794px; height: 1123px; margin: 0 0 24px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); overflow: hidden; box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tp-page.tp-grow { height: auto; min-height: 1123px; }
.tp-bg { position: absolute; inset: 0; background-size: 100% 100%; background-repeat: no-repeat; }
.tp-head { position: absolute; left: 67px; right: 67px; top: 36px; padding-bottom: 8px; border-bottom: 1px solid #333; }
.tp-head b { display: block; font-size: 18px; }
.tp-head span { display: block; font-size: 11px; color: #4b5563; }
.tp-wm { position: absolute; left: 50%; top: 50%; width: 1000px; margin-left: -500px; text-align: center; font: 700 40px/1 Helvetica, Arial, sans-serif; color: rgba(100, 100, 120, .24); transform: translateY(-50%) rotate(-45deg); white-space: nowrap; pointer-events: none; user-select: none; z-index: 1; letter-spacing: 1px; }
.tp-content { position: absolute; left: 67px; right: 67px; overflow: hidden; z-index: 2; font-size: 13.3px; line-height: 1.55; color: #111; }
.tp-grow .tp-content { position: relative; overflow: visible; }
.tp-foot { position: absolute; left: 67px; right: 67px; bottom: 22px; z-index: 2; font-size: 10px; color: #555; border-top: 1px solid #888; padding-top: 6px; }
.tp-foot .tp-foot-top { display: flex; justify-content: space-between; }
.tp-foot div { line-height: 1.35; }
.tp-t { text-align: center; font-weight: 700; font-size: 17px; margin: 0 0 12px; letter-spacing: .3px; }
.tp-h { font-weight: 700; color: #1e1e73; font-size: 14.5px; margin: 10px 0 4px; }
.tp-p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 9px; }
.tp-sign { margin-top: 6px; }
.tp-kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 6px 0 10px; }
.tp-kv b { font-weight: 700; }
.tp-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 12.5px; }
.tp-table th, .tp-table td { border: 1px solid #555; padding: 4px 6px; text-align: left; vertical-align: top; }
.tp-table th { background: #eef0f5; }
.tp-note { font-weight: 700; font-size: 12px; margin: 6px 0 10px; }
.tp-signbox { margin-top: 28px; display: flex; gap: 28px; flex-wrap: wrap; }
.tp-signbox > div { flex: 1 1 200px; border-top: 1px solid #111; padding-top: 4px; font-size: 12px; }
.tp-signnote { flex-basis: 100%; border: 0 !important; font-size: 11px; color: #92400e; font-weight: 700; padding-top: 0 !important; }
@media (max-width: 640px) {
  .tp-tools button { min-height: 40px; min-width: 40px; padding: 6px 8px; font-size: 12px; }
  .tp-long { display: none; }
  .tp-short { display: inline; }
  .tp-sep { display: none; }
  .tp-stage { padding: 8px 0 24px; }
}
@media print {
  @page { size: A4; margin: 0; }
  body.tp-open > *:not(.tp-overlay) { display: none !important; }
  body.tp-open { overflow: visible !important; background: #fff !important; }
  .tp-overlay { position: static !important; display: block !important; background: #fff !important; }
  .tp-bar, .tp-banner, .tp-notice, .tp-error { display: none !important; }
  .tp-stage { overflow: visible !important; padding: 0 !important; }
  .tp-scaler { width: auto !important; height: auto !important; margin: 0 !important; }
  .tp-pages { position: static !important; transform: none !important; width: auto !important; }
  .tp-page { box-shadow: none !important; margin: 0 !important; width: 210mm !important; height: 296mm !important; break-after: page; page-break-after: always; overflow: hidden !important; }
  .tp-page:last-child { break-after: auto; page-break-after: auto; }
}
