/* HR document template designer + manual issue (assets/hr/template-designer.js) */
[data-tp-preview] { display: none !important; } /* the older fixed-layout demo is replaced by the designer's live preview */
.td-btn-row { margin-right: 6px; }
.td-open { overflow: hidden; }
.td-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.45; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.td-banner-manual { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.td-banner-auto { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.td-banner-text { flex: 1 1 320px; }
.td-banner-btn { min-height: 44px; padding: 8px 14px; border-radius: 8px; border: 1px solid currentColor; background: transparent; color: inherit; font-size: 13px; cursor: pointer; }
.td-banner-btn[hidden] { display: none; }

.td-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: #f1f5f9; color: #0f172a; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; }
.td-overlay-top { z-index: 100200; background: rgba(15, 23, 42, .55); align-items: center; justify-content: center; padding: 12px; }
.td-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 8px 12px; background: #1e293b; color: #fff; }
.td-bar-title { flex: 1 1 220px; min-width: 0; font-weight: 600; font-size: 15px; }
.td-bar-title div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-bar-title small { display: block; font-weight: 400; font-size: 12px; color: #cbd5e1; }
.td-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.td-b { min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: 8px; border: 1px solid #94a3b8; background: #fff; color: #0f172a; font-size: 14px; cursor: pointer; line-height: 1.2; }
.td-bar .td-b { background: #334155; color: #fff; border-color: #475569; }
.td-b:hover:not(:disabled) { filter: brightness(1.08); }
.td-b:focus-visible, .td-input:focus-visible, .td-who-item:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.td-b:disabled { opacity: .5; cursor: not-allowed; }
.td-b.td-primary, .td-bar .td-b.td-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.td-b.td-close, .td-bar .td-b.td-close { background: #7f1d1d; border-color: #991b1b; color: #fff; }
.td-tabs { display: none; padding: 6px 8px; gap: 6px; background: #e2e8f0; }
.td-tab { flex: 1; }
.td-tab.td-on { background: #2563eb; color: #fff; border-color: #2563eb; }
.td-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(360px, 46%) 1fr; gap: 0; }
.td-left { overflow: auto; padding: 14px; background: #fff; border-right: 1px solid #cbd5e1; }
.td-right { display: flex; flex-direction: column; min-height: 0; padding: 10px; gap: 8px; }
.td-f { display: block; margin: 0 0 12px; }
.td-f-l { display: block; font-weight: 600; margin: 0 0 4px; font-size: 13px; }
.td-f-h { display: block; margin-top: 3px; color: #64748b; font-size: 12px; }
.td-input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 10px; font-size: 16px; border: 1px solid #94a3b8; border-radius: 8px; background: #fff; color: #0f172a; }
.td-ta { width: 100%; box-sizing: border-box; min-height: 380px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px; border: 1px solid #94a3b8; border-radius: 8px; resize: vertical; }
.td-modebar { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.td-modebar-l { font-weight: 600; font-size: 13px; margin-right: 6px; }
.td-mode.td-on { background: #0f172a; color: #fff; border-color: #0f172a; }
.td-hint { margin: 8px 0; color: #475569; font-size: 12px; line-height: 1.45; }
.td-pal { margin: 10px 0; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px; }
.td-pal summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 8px 0; min-height: 28px; }
.td-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }
.td-chip { min-height: 36px; padding: 4px 10px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; border-radius: 999px; background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.td-chip-block { font-family: inherit; background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.td-pvbar { position: relative; }
.td-who-wrap { position: relative; }
.td-who-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid #94a3b8; border-radius: 8px; max-height: 260px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.td-who-list[hidden] { display: none; }
.td-who-item { display: block; width: 100%; text-align: left; min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 1px solid #e2e8f0; background: #fff; color: #0f172a; font-size: 14px; cursor: pointer; }
.td-who-item:hover { background: #eff6ff; }
.td-picked { margin: -6px 0 12px; font-size: 12px; color: #475569; }
.td-warn { padding: 8px 10px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 12px; }
.td-warn[hidden] { display: none; }
.td-frame-wrap { flex: 1 1 auto; min-height: 300px; overflow: auto; border: 1px solid #cbd5e1; border-radius: 8px; background: #e5e7eb; -webkit-overflow-scrolling: touch; }
.td-frame-wrap-small { flex: none; height: 360px; margin: 10px 0; }
.td-frame-wrap[hidden] { display: none; }
.td-frame-sizer { margin: 0 auto; position: relative; }
.td-frame { display: block; border: 0; background: #e5e7eb; width: 830px; height: 1200px; }
.td-status { font-size: 12px; color: #475569; }
.td-dialog { width: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.td-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; }
.td-dialog-head h2 { margin: 0; font-size: 17px; }
.td-dialog-body { padding: 14px 16px 16px; overflow: auto; }
.td-actions { position: sticky; bottom: -16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 10px 0 0; background: #fff; }
.td-msg { min-height: 20px; margin: 6px 0; font-size: 13px; }
.td-msg-err { color: #b91c1c; }
.td-msg-ok { color: #047857; font-weight: 600; }
.td-link { color: #1d4ed8; text-decoration: underline; }
.td-hrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.td-hinfo { flex: 1 1 220px; }
.td-hinfo small { display: block; color: #64748b; font-size: 12px; }
.td-toast { position: fixed; z-index: 100300; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: min(560px, 92vw); padding: 10px 16px; border-radius: 8px; color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.3); display: none; }
.td-toast.td-show { display: block; }
.td-toast.td-ok { background: #047857; }
.td-toast.td-err { background: #b91c1c; }
.jodit-container, .jodit-popup, .jodit-dialog { z-index: 100100; }

@media (max-width: 900px) {
  .td-tabs { display: flex; }
  .td-main { grid-template-columns: 1fr; }
  .td-left, .td-right { grid-column: 1; grid-row: 1; }
  .td-right { display: none; }
  .td-show-prev .td-left { display: none; }
  .td-show-prev .td-right { display: flex; }
  .td-frame-wrap { min-height: 70vh; }
  .td-dialog-body { padding-bottom: 8px; }
}
@media (max-width: 480px) {
  .td-overlay-top { padding: 0; align-items: stretch; }
  .td-dialog { border-radius: 0; width: 100%; }
}
