.tjc-forms-manager {
    width: 100%;
}

.tjc-forms-manager-head,
.tjc-job-forms-head,
.tjc-new-job-forms-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tjc-forms-manager-head h2,
.tjc-job-forms-head h3,
.tjc-new-job-forms-head h3,
.tjc-form-builder-heading h3,
.tjc-form-builder-toolbar h3 {
    margin: 0 0 6px;
}

.tjc-forms-manager-head p,
.tjc-job-forms-head p,
.tjc-form-builder-heading p,
.tjc-form-builder-toolbar p {
    margin: 0;
    color: #64748b;
}

.tjc-form-template-list {
    display: grid;
    gap: 12px;
}

.tjc-forms-empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border: 1px dashed #cbd5e1;
    border-radius: 15px;
    background: #fff;
    color: #64748b;
}

.tjc-forms-empty strong {
    color: #172b4d;
}

.tjc-form-template-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid #dce5ef;
    border-radius: 15px;
    background: #fff;
}

.tjc-form-template-copy {
    min-width: 0;
}

.tjc-form-template-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tjc-form-template-card h3 {
    margin: 0;
}

.tjc-form-template-card p {
    margin: 7px 0 9px;
    color: #64748b;
}

.tjc-form-template-meta {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}

.tjc-form-template-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.tjc-forms-manager .tjc-link-btn,
.tjc-job-forms-section .tjc-link-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f5f8b;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.tjc-forms-manager .tjc-link-btn:hover,
.tjc-forms-manager .tjc-link-btn:focus,
.tjc-job-forms-section .tjc-link-btn:hover,
.tjc-job-forms-section .tjc-link-btn:focus {
    text-decoration: underline;
}

.tjc-forms-manager .tjc-link-btn-danger,
.tjc-job-forms-section .tjc-link-btn-danger {
    color: #b42318;
}

.tjc-form-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f5ec;
    color: #1f6f3f;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tjc-form-status-badge.is-inactive,
.tjc-form-status-badge.is-draft {
    background: #f1f5f9;
    color: #64748b;
}

.tjc-form-status-badge.is-completed {
    background: #e8f5ec;
    color: #1f6f3f;
}

/* Template builder */
.tjc-form-builder {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #dce5ef;
    border-radius: 16px;
    background: #f8fafc;
}

.tjc-form-builder-heading,
.tjc-form-builder-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.tjc-form-details-card {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    background: #fff;
}

.tjc-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
    gap: 13px 15px;
}

.tjc-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tjc-form-field-full {
    grid-column: 1 / -1;
}

.tjc-form-builder .tjc-form-field > span,
.tjc-builder-field-editor label > span {
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}

.tjc-form-builder .tjc-form-field input[type="text"],
.tjc-form-builder .tjc-form-field select,
.tjc-form-builder .tjc-form-field textarea,
.tjc-builder-field-editor input[type="text"],
.tjc-builder-field-editor select,
.tjc-builder-field-editor textarea {
    width: 100%;
    min-height: 41px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #cfd9e5;
    border-radius: 9px;
    background: #fff;
    color: #172b4d;
    box-shadow: none;
    box-sizing: border-box;
    font: inherit;
}

.tjc-form-builder .tjc-form-field input[type="text"]:focus,
.tjc-form-builder .tjc-form-field select:focus,
.tjc-form-builder .tjc-form-field textarea:focus,
.tjc-builder-field-editor input[type="text"]:focus,
.tjc-builder-field-editor select:focus,
.tjc-builder-field-editor textarea:focus {
    outline: none;
    border-color: #6c9fbd;
    box-shadow: 0 0 0 3px rgba(74, 129, 165, .12);
}

.tjc-form-builder .tjc-form-field textarea {
    min-height: 66px;
    resize: vertical;
}

.tjc-form-status-field select {
    max-width: 190px;
}

.tjc-form-builder-toolbar {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #dce5ef;
}

.tjc-builder-field-editor {
    margin-top: 13px;
    padding: 15px;
    border: 1px solid #bfd2e5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 43, 77, .06);
}

.tjc-builder-field-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.tjc-builder-field-editor-head strong,
.tjc-builder-field-editor-head span {
    display: block;
}

.tjc-builder-field-editor-head strong {
    color: #172b4d;
    font-size: 15px;
}

.tjc-builder-field-editor-head span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.tjc-builder-field-main {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, .6fr);
    gap: 12px;
}

.tjc-builder-field-editor label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tjc-builder-field-help,
.tjc-builder-field-options {
    margin-top: 11px;
}

.tjc-builder-field-editor textarea {
    min-height: 72px;
    resize: vertical;
}

.tjc-builder-field-editor-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5ebf2;
}

.tjc-builder-required {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 7px !important;
    color: #334155;
    font-weight: 700;
}

.tjc-builder-required input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.tjc-builder-field-editor-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.tjc-builder-empty {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 13px;
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
    color: #64748b;
}

.tjc-builder-empty[hidden] {
    display: none !important;
}

.tjc-builder-empty strong {
    color: #334155;
}

.tjc-builder-fields {
    display: grid;
    gap: 8px;
    margin-top: 13px;
}

.tjc-builder-field {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 9px 11px;
    border: 1px solid #dce5ef;
    border-radius: 11px;
    background: #fff;
}

.tjc-builder-field-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #eef4f8;
    color: #33566d;
    font-size: 12px;
    font-weight: 800;
}

.tjc-builder-field-summary {
    min-width: 0;
}

.tjc-builder-field-summary strong {
    display: block;
    overflow: hidden;
    color: #172b4d;
    font-size: 14px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tjc-builder-field-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
}

.tjc-builder-field-type {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef4f8;
    color: #33566d;
    font-weight: 800;
}

.tjc-builder-field-required {
    color: #9a3412;
    font-weight: 800;
}

.tjc-builder-field-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tjc-builder-field-actions .tjc-link-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    text-decoration: none;
}

.tjc-form-builder-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid #dce5ef;
}

.tjc-form-message {
    min-height: 20px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.tjc-form-message.is-error {
    color: #b42318;
}

.tjc-form-message.is-success {
    color: #1f6f3f;
}

/* Form selection and job-card forms */
.tjc-new-job-template-grid {
    display: grid;
    gap: 10px;
}

.tjc-new-job-template-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: 11px;
    background: #fff;
}

.tjc-new-job-template-option label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
}

.tjc-new-job-template-option input[type="checkbox"] {
    width: 19px;
    height: 19px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.tjc-new-job-template-option span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tjc-new-job-template-option small {
    color: #64748b;
    line-height: 1.4;
}

.tjc-new-job-template-option > a {
    flex: 0 0 auto;
    color: #1f5f8b;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.tjc-new-job-template-option > a:hover,
.tjc-new-job-template-option > a:focus {
    text-decoration: underline;
}

.tjc-job-forms-section {
    margin-top: 18px;
}

.tjc-form-attach-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f8fafc;
}

.tjc-form-attach-row select {
    min-height: 42px;
    flex: 1 1 260px;
}

.tjc-job-form-list {
    display: grid;
    gap: 12px;
}

.tjc-job-form-empty {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
}

.tjc-job-form-card {
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    background: #fff;
}

.tjc-job-form-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    background: #f8fafc;
    cursor: pointer;
    list-style: none;
}

.tjc-job-form-card > summary::-webkit-details-marker {
    display: none;
}

.tjc-job-form-summary-copy {
    min-width: 0;
}

.tjc-job-form-summary-copy strong,
.tjc-job-form-summary-copy small {
    display: block;
}

.tjc-job-form-summary-copy small {
    margin-top: 4px;
    color: #64748b;
    line-height: 1.4;
}

.tjc-job-form-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 13px;
    padding: 14px;
}

.tjc-job-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tjc-job-form-field-full,
.tjc-job-form-heading,
.tjc-job-form-instruction,
.tjc-job-form-actions {
    grid-column: 1 / -1;
}

.tjc-job-form-label {
    font-weight: 800;
    color: #334155;
}

.tjc-job-form-label em {
    color: #b42318;
    font-style: normal;
}

.tjc-job-form-field > small {
    color: #64748b;
    line-height: 1.35;
}

.tjc-job-form-field input:not([type="checkbox"]),
.tjc-job-form-field select,
.tjc-job-form-field textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cfd9e5;
    border-radius: 9px;
    background: #fff;
    color: #172b4d;
    box-sizing: border-box;
}

.tjc-job-form-field textarea {
    min-height: 78px;
    resize: vertical;
}

.tjc-job-form-heading {
    margin: 3px 0 0;
    padding-bottom: 7px;
    border-bottom: 1px solid #dce5ef;
}

.tjc-job-form-instruction {
    padding: 10px 12px;
    border-left: 4px solid #65b846;
    border-radius: 8px;
    background: #f3f8f4;
    color: #334155;
    line-height: 1.45;
}

.tjc-job-form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cfd9e5;
    border-radius: 9px;
    background: #fff;
}

.tjc-job-form-checkbox input {
    width: 19px;
    height: 19px;
    margin: 0;
}

.tjc-job-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 5px;
}

.tjc-form-signature-preview {
    display: flex;
    align-items: center;
    min-height: 96px;
    padding: 9px;
    border: 1px solid #d8e1eb;
    border-radius: 9px;
    background: #fff;
}

.tjc-form-signature-preview img {
    display: block;
    max-width: 100%;
    max-height: 84px;
}

.tjc-form-signature-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Signature modal */
.tjc-form-signature-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .72);
}

.tjc-form-signature-overlay[hidden] {
    display: none !important;
}

.tjc-form-signature-dialog {
    width: min(840px, 100%);
    overflow: hidden;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .35);
}

.tjc-form-signature-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 18px;
    border-bottom: 1px solid #dce5ef;
}

.tjc-form-signature-dialog-head strong,
.tjc-form-signature-dialog-head span {
    display: block;
}

.tjc-form-signature-dialog-head span {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.tjc-form-signature-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #172b4d;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.tjc-form-signature-canvas-wrap {
    padding: 18px;
    background: #f8fafc;
}

.tjc-form-signature-canvas {
    display: block;
    width: 100%;
    height: 300px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.tjc-form-signature-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px 18px;
    border-top: 1px solid #dce5ef;
}

@media (max-width: 760px) {
    .tjc-forms-manager-head,
    .tjc-job-forms-head,
    .tjc-form-builder-heading,
    .tjc-form-builder-toolbar,
    .tjc-form-template-card {
        flex-direction: column;
        align-items: stretch;
    }

    .tjc-form-template-actions {
        width: 100%;
    }

    .tjc-form-grid,
    .tjc-builder-field-main,
    .tjc-job-form-body {
        grid-template-columns: 1fr;
    }

    .tjc-form-status-field select {
        max-width: none;
    }

    .tjc-builder-field-editor-controls,
    .tjc-new-job-template-option,
    .tjc-form-attach-row {
        align-items: stretch;
        flex-direction: column;
    }

    .tjc-builder-field {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .tjc-builder-field-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 43px;
    }

    .tjc-builder-field-summary strong {
        white-space: normal;
    }

    .tjc-builder-field-editor-actions,
    .tjc-form-builder-actions,
    .tjc-job-form-actions,
    .tjc-form-signature-dialog-actions {
        width: 100%;
    }

    .tjc-builder-field-editor-actions .tjc-button,
    .tjc-form-builder-actions .tjc-button,
    .tjc-job-form-actions .tjc-button,
    .tjc-form-signature-dialog-actions .tjc-button {
        flex: 1 1 auto;
    }

    .tjc-new-job-template-option > a {
        margin-left: 29px;
    }

    .tjc-form-signature-overlay {
        align-items: stretch;
        padding: 0;
    }

    .tjc-form-signature-dialog {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 100%;
        border-radius: 0;
    }

    .tjc-form-signature-canvas-wrap {
        display: flex;
        flex: 1 1 auto;
        padding: 12px;
    }

    .tjc-form-signature-canvas {
        height: auto;
        min-height: 320px;
        flex: 1 1 auto;
    }
}

/* V5 compact attachment workflow */
.tjc-new-job-forms-head{align-items:center}.tjc-new-job-form-picker{display:flex;align-items:center;gap:10px;margin:12px 0}.tjc-new-job-form-picker select{flex:1;min-height:42px}.tjc-new-job-selected-list{display:grid;gap:8px}.tjc-new-job-selected-item{display:flex;align-items:center;gap:12px;padding:11px 13px;border:1px solid #dce5ef;border-radius:12px;background:#f8fafc}.tjc-new-job-selected-item>span{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.tjc-new-job-selected-item small{color:#64748b}.tjc-job-form-list{display:grid;gap:10px}.tjc-job-form-card-compact{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:13px 14px;border:1px solid #dce5ef;border-radius:13px;background:#fff}.tjc-job-form-card-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#eef6ff;font-size:19px}.tjc-job-form-summary-copy{display:flex;min-width:0;flex-direction:column;gap:3px}.tjc-job-form-summary-copy strong{font-size:15px}.tjc-job-form-summary-copy small{color:#64748b;line-height:1.35}.tjc-job-form-card-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tjc-job-form-card-actions .tjc-button{min-height:38px;padding:8px 12px}.tjc-job-form-completion-card{border:0;border-radius:0;background:transparent}.tjc-job-form-completion-card .tjc-job-form-field{margin-bottom:14px}.tjc-job-form-completion-card .tjc-job-form-heading{margin:18px 0 10px}.tjc-job-form-completion-card input,.tjc-job-form-completion-card select,.tjc-job-form-completion-card textarea{width:100%}

/* Stronger custom form library */
.tjc-form-template-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.tjc-form-template-card{position:relative;display:grid;grid-template-columns:1fr;align-content:space-between;min-height:180px;padding:18px 18px 15px;border-radius:16px;box-shadow:0 5px 16px rgba(15,23,42,.04)}.tjc-form-template-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;border-radius:16px 0 0 16px;background:#65b846}.tjc-form-template-card h3{font-size:18px}.tjc-form-template-card p{line-height:1.45}.tjc-form-template-actions{justify-content:flex-end;padding-top:12px;border-top:1px solid #edf2f7}.tjc-form-template-meta{display:inline-flex;margin-top:5px;padding:4px 8px;border-radius:999px;background:#f1f5f9}
@media(max-width:900px){.tjc-form-template-list{grid-template-columns:1fr}}@media(max-width:700px){.tjc-new-job-forms-head,.tjc-job-forms-head{align-items:stretch;flex-direction:column}.tjc-new-job-form-picker{align-items:stretch;flex-direction:column}.tjc-job-form-card-compact{grid-template-columns:auto minmax(0,1fr);align-items:start}.tjc-job-form-card-compact>.tjc-form-status-badge{justify-self:start}.tjc-job-form-card-actions{grid-column:1/-1}.tjc-job-form-card-actions .tjc-button{flex:1}.tjc-form-template-card{min-height:0}}

/* V5.1 attached-form card layout correction */
.tjc-job-form-card-compact {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.tjc-job-form-card-compact .tjc-job-form-card-icon {
    grid-column: 1;
    grid-row: 1;
}

.tjc-job-form-card-compact .tjc-job-form-summary-copy {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
}

.tjc-job-form-card-compact .tjc-job-form-summary-copy strong {
    display: block;
    min-width: 0;
    font-size: 16px;
    line-height: 1.3;
    overflow-wrap: normal;
    word-break: normal;
}

.tjc-job-form-card-compact .tjc-job-form-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.35;
}

.tjc-job-form-card-compact .tjc-job-form-meta span {
    display: inline-flex;
    align-items: center;
    white-space: normal;
}

.tjc-job-form-card-compact .tjc-job-form-meta span + span::before {
    content: "•";
    margin-right: 8px;
    color: #94a3b8;
}

.tjc-job-form-card-compact > .tjc-form-status-badge {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    white-space: nowrap;
}

.tjc-job-form-card-compact .tjc-job-form-card-actions {
    grid-column: 2 / 4;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-button,
.tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-link-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.tjc-job-form-card-compact .tjc-form-message {
    flex-basis: 100%;
}

@media (max-width: 700px) {
    .tjc-job-form-card-compact {
        grid-template-columns: 38px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        padding: 12px;
    }

    .tjc-job-form-card-compact .tjc-job-form-card-icon {
        grid-column: 1;
        grid-row: 1;
    }

    .tjc-job-form-card-compact .tjc-job-form-summary-copy {
        grid-column: 2;
        grid-row: 1;
    }

    .tjc-job-form-card-compact > .tjc-form-status-badge {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }

    .tjc-job-form-card-compact .tjc-job-form-card-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-button {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-link-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .tjc-job-form-card-compact .tjc-job-form-meta {
        display: grid;
        gap: 2px;
    }

    .tjc-job-form-card-compact .tjc-job-form-meta span + span::before {
        content: none;
    }
}


/* V5.2 mobile polish and signature reliability */
.tjc-form-signature-preview[hidden],
.tjc-form-signature-overlay[hidden],
.tjc-new-job-form-picker[hidden],
.tjc-form-attach-row[hidden] { display: none !important; }

.tjc-form-template-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tjc-form-template-card {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: stretch;
    gap: 12px;
    min-height: 170px;
    padding: 16px 16px 12px;
    overflow: hidden;
}
.tjc-form-template-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #65b846;
}
.tjc-form-template-copy { padding-left: 2px; }
.tjc-form-template-title-row { gap: 8px; }
.tjc-form-template-card h3 { font-size: 17px; line-height: 1.3; }
.tjc-form-template-card p { margin: 7px 0 10px; font-size: 14px; line-height: 1.45; }
.tjc-form-template-actions {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #e8eef5;
}
.tjc-form-template-actions .tjc-link-btn {
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid #d6e1ec;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1;
    text-decoration: none !important;
}
.tjc-form-template-actions .tjc-link-btn-danger { border-color: #f0c7c3; }

.tjc-new-job-forms-head,
.tjc-job-forms-head { margin-bottom: 10px; }
.tjc-new-job-form-picker,
.tjc-form-attach-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    margin: 10px 0 12px;
    padding: 10px;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f8fafc;
}
.tjc-new-job-form-picker select,
.tjc-form-attach-row select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    margin: 0;
    padding: 7px 36px 7px 11px;
    border: 1px solid #cfd9e5;
    border-radius: 9px;
    background-color: #fff;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.2;
}
.tjc-new-job-form-picker .tjc-button,
.tjc-form-attach-row .tjc-button {
    min-height: 42px;
    height: 42px;
    padding: 8px 15px;
    white-space: nowrap;
}
.tjc-form-attach-row .tjc-form-message { grid-column: 1 / -1; }

.tjc-job-form-card-compact > .tjc-form-status-badge {
    width: auto;
    min-width: 0;
    max-width: max-content;
    padding: 5px 9px;
}
.tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-link-btn {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #d6e1ec;
    border-radius: 8px;
    text-decoration: none !important;
}

.tjc-form-signature-preview { min-height: 80px; }
.tjc-form-signature-preview img[src=""] { display: none; }
.tjc-form-signature-actions .tjc-button { min-height: 40px; }

.tjc-form-complete-actions .tjc-form-action-draft {
    background: #eaf2ff;
    border-color: #bdd3f5;
    color: #145da0;
}
.tjc-form-complete-actions .tjc-form-action-submit {
    background: #35a844;
    border-color: #35a844;
    color: #fff;
}
.tjc-form-complete-actions .tjc-form-action-exit {
    background: #fff1f0;
    border: 1px solid #efc4c0;
    color: #b42318;
}

@media (max-width: 760px) {
    .tjc-forms-manager { overflow: hidden; }
    .tjc-forms-manager-head { gap: 12px; margin-bottom: 14px; }
    .tjc-forms-manager-head h2 { font-size: 23px; line-height: 1.2; }
    .tjc-forms-manager-head p { font-size: 15px; line-height: 1.45; }
    .tjc-forms-manager-head .tjc-button { width: 100%; min-height: 46px; }
    .tjc-form-template-list { grid-template-columns: 1fr; gap: 10px; }
    .tjc-form-template-card {
        min-height: 0;
        padding: 14px 13px 11px 16px;
        border-radius: 14px;
    }
    .tjc-form-template-card h3 { font-size: 16px; overflow-wrap: anywhere; }
    .tjc-form-template-card p { font-size: 13px; margin-bottom: 8px; }
    .tjc-form-template-title-row { align-items: flex-start; }
    .tjc-form-status-badge { min-height: 21px; padding: 4px 7px; font-size: 10px; }
    .tjc-form-template-actions {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .tjc-form-template-actions .tjc-link-btn { width: 100%; justify-content: center; padding: 6px 4px; }

    .tjc-new-job-forms-head,
    .tjc-job-forms-head { display: block; }
    .tjc-new-job-form-picker,
    .tjc-form-attach-row {
        grid-template-columns: 1fr;
        padding: 9px;
        gap: 8px;
    }
    .tjc-new-job-form-picker select,
    .tjc-form-attach-row select {
        min-height: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 16px;
    }
    .tjc-new-job-form-picker .tjc-button,
    .tjc-form-attach-row .tjc-button {
        width: 100%;
        min-height: 44px;
        height: 44px;
    }

    .tjc-job-form-card-compact > .tjc-form-status-badge {
        justify-self: start;
        width: auto !important;
        max-width: max-content;
    }
    .tjc-job-form-card-compact .tjc-job-form-card-actions {
        gap: 7px;
    }
    .tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-button {
        min-height: 42px;
    }
    .tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-link-btn {
        min-height: 36px;
        font-size: 12px;
    }

    .tjc-form-complete-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 9px !important;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom)) !important;
    }
    .tjc-form-complete-actions .tjc-form-action-draft,
    .tjc-form-complete-actions .tjc-form-action-submit {
        width: 100%;
        min-height: 46px;
        justify-content: center;
    }
    .tjc-form-complete-actions .tjc-form-action-exit {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(180px, 70%);
        min-height: 40px;
        justify-content: center;
    }
    .tjc-form-complete-actions .tjc-form-message { grid-column: 1 / -1; }

    .tjc-form-signature-preview { min-height: 72px; }
    .tjc-form-signature-actions { gap: 8px; }
    .tjc-form-signature-actions .tjc-button { width: auto; flex: 0 0 auto; }
}


/* V5.3 final mobile signature and completion controls */
.tjc-form-signature-preview {
    min-height: 116px;
    justify-content: center;
}
.tjc-form-signature-preview img {
    width: 100%;
    max-width: 420px;
    max-height: 104px;
    object-fit: contain;
    object-position: center;
}
.tjc-form-signature-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.tjc-form-signature-dialog-actions [data-tjc-clear-form-signature-pad] {
    background: #eaf2ff;
    border-color: #bdd3f5;
    color: #145da0;
}
.tjc-form-signature-dialog-actions [data-tjc-use-form-signature] {
    background: #35a844;
    border-color: #35a844;
    color: #fff;
}
.tjc-form-complete-actions {
    grid-template-columns: 1fr 1fr !important;
}

@media (max-width: 760px) {
    .tjc-form-signature-dialog {
        min-height: 100dvh;
        height: 100dvh;
    }
    .tjc-form-signature-dialog-actions {
        flex: 0 0 auto;
        width: 100%;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
        background: #fff;
        box-sizing: border-box;
    }
    .tjc-form-signature-dialog-actions .tjc-button {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        margin: 0;
        justify-content: center;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
    }
    .tjc-form-signature-canvas-wrap {
        min-height: 0;
        padding-bottom: 8px;
    }
    .tjc-form-signature-preview {
        min-height: 104px;
        padding: 10px;
    }
    .tjc-form-signature-preview img {
        max-height: 92px;
    }
    .tjc-form-complete-actions {
        grid-template-columns: 1fr 1fr !important;
    }
}


/* Part 5: technician mobile attached-form card refinement. */
@media (max-width: 760px) {
    .tjc-job-forms-section .tjc-job-form-card-compact {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 16px 18px;
        column-gap: 14px;
        row-gap: 10px;
        overflow: hidden;
        box-sizing: border-box;
    }

    .tjc-job-forms-section .tjc-job-form-card-compact .tjc-job-form-card-icon {
        grid-column: 1;
        grid-row: 1;
        width: 40px;
        height: 40px;
        margin: 2px 0 0 2px;
        align-self: start;
        box-sizing: border-box;
    }

    .tjc-job-forms-section .tjc-job-form-card-compact .tjc-job-form-summary-copy {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        padding: 0;
    }

    .tjc-job-forms-section .tjc-job-form-card-compact > .tjc-form-status-badge {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        margin: 0;
    }

    .tjc-job-forms-section .tjc-job-form-card-compact .tjc-job-form-card-actions {
        grid-column: 2;
        grid-row: 3;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: auto;
        min-width: 0;
        margin: 0;
    }

    .tjc-job-forms-section .tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-button,
    .tjc-job-forms-section .tjc-job-form-card-compact .tjc-job-form-card-actions .tjc-link-btn {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: auto !important;
        max-width: 100%;
        min-width: 112px;
        min-height: 40px;
        margin: 0;
        padding: 8px 14px;
        box-sizing: border-box;
        text-align: center;
        white-space: nowrap;
    }
}

/* V5.4 compact mobile custom forms manager and builder */
@media (max-width: 760px) {
    .tjc-form-template-card {
        gap: 9px;
        padding: 13px 12px 10px 20px;
        overflow: hidden;
    }

    .tjc-form-template-card::before {
        width: 4px;
    }

    .tjc-form-template-copy {
        padding-left: 0;
    }

    .tjc-form-template-title-row {
        gap: 7px;
    }

    .tjc-form-template-card h3 {
        line-height: 1.25;
    }

    .tjc-form-template-card p {
        margin: 5px 0 7px;
        line-height: 1.4;
    }

    .tjc-form-template-meta {
        margin-top: 2px;
    }

    .tjc-form-template-actions {
        gap: 5px;
        padding-top: 8px;
    }

    .tjc-form-template-actions .tjc-link-btn {
        min-height: 36px;
        padding: 5px 6px;
        border-radius: 7px;
        font-size: 12px;
    }

    .tjc-form-builder-heading {
        gap: 6px;
        margin-bottom: 12px;
    }

    .tjc-form-builder-heading h3 {
        margin-bottom: 4px;
        font-size: 22px;
        line-height: 1.2;
    }

    .tjc-form-builder-heading p,
    .tjc-form-builder-toolbar p {
        font-size: 14px;
        line-height: 1.4;
    }

    .tjc-builder-fields {
        gap: 8px;
        margin-top: 10px;
    }

    .tjc-builder-field {
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: start;
        gap: 8px 10px;
        min-height: 0;
        padding: 10px;
        border-radius: 10px;
    }

    .tjc-builder-field-index {
        width: 30px;
        height: 30px;
    }

    .tjc-builder-field-summary {
        align-self: center;
        padding-top: 1px;
    }

    .tjc-builder-field-summary strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .tjc-builder-field-meta {
        gap: 5px;
        margin-top: 3px;
        font-size: 10px;
    }

    .tjc-builder-field-type {
        min-height: 19px;
        padding: 2px 6px;
    }

    .tjc-builder-field-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(54px, 1fr) 38px 38px minmax(64px, 1fr);
        align-items: center;
        justify-content: stretch;
        gap: 5px;
        width: 100%;
        padding: 7px 0 0;
        border-top: 1px solid #edf2f7;
    }

    .tjc-builder-field-actions .tjc-link-btn {
        width: 100%;
        min-width: 0;
        min-height: 32px;
        padding: 4px 5px;
        border: 1px solid #d6e1ec;
        border-radius: 7px;
        font-size: 11px;
        line-height: 1;
        text-align: center;
        text-decoration: none !important;
    }

    .tjc-builder-field-actions [data-move-field-up],
    .tjc-builder-field-actions [data-move-field-down] {
        font-size: 0;
    }

    .tjc-builder-field-actions [data-move-field-up]::before {
        content: "\2191";
        font-size: 18px;
        line-height: 1;
    }

    .tjc-builder-field-actions [data-move-field-down]::before {
        content: "\2193";
        font-size: 18px;
        line-height: 1;
    }

    .tjc-builder-field-actions .tjc-link-btn-danger {
        border-color: #f0c7c3;
    }
}

/* V5.5 premium mobile form-card and builder-field refinement */
@media (max-width: 760px) {
    .tjc-forms-manager .tjc-form-template-card {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        padding: 14px 14px 12px 24px !important;
        gap: 10px;
        border-radius: 14px;
        overflow: hidden;
    }

    .tjc-forms-manager .tjc-form-template-card::before {
        left: 7px;
        top: 12px;
        bottom: 12px;
        width: 4px;
        border-radius: 999px;
    }

    .tjc-forms-manager .tjc-form-template-copy,
    .tjc-forms-manager .tjc-form-template-title-row,
    .tjc-forms-manager .tjc-form-template-actions {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .tjc-forms-manager .tjc-form-template-title-row {
        align-items: center;
        column-gap: 8px;
        row-gap: 6px;
    }

    .tjc-forms-manager .tjc-form-template-card h3 {
        min-width: 0;
        font-size: 16px;
        line-height: 1.28;
        overflow-wrap: anywhere;
    }

    .tjc-forms-manager .tjc-form-template-card p {
        margin: 6px 0 8px;
        font-size: 13px;
        line-height: 1.42;
    }

    .tjc-forms-manager .tjc-form-template-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        padding-top: 9px !important;
    }

    .tjc-forms-manager .tjc-form-template-actions .tjc-link-btn {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 38px;
        margin: 0 !important;
        padding: 6px 8px !important;
        border-radius: 9px;
        font-size: 12px;
        line-height: 1;
        white-space: nowrap;
    }

    .tjc-form-builder .tjc-builder-fields {
        gap: 9px;
    }

    .tjc-form-builder .tjc-builder-field {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px 10px;
        min-height: 0;
        padding: 10px 11px 9px;
        border-radius: 12px;
    }

    .tjc-form-builder .tjc-builder-field-summary {
        min-width: 0;
        padding-top: 1px;
    }

    .tjc-form-builder .tjc-builder-field-summary strong {
        font-size: 14px;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .tjc-form-builder .tjc-builder-field-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(72px, 1fr) 40px 40px minmax(82px, 1fr);
        gap: 6px;
        width: 100%;
        padding: 8px 0 0 !important;
        margin: 0 !important;
        border-top: 1px solid #edf2f7;
    }

    .tjc-form-builder .tjc-builder-field-actions .tjc-link-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 34px;
        margin: 0 !important;
        padding: 5px 7px !important;
        border: 1px solid #d6e1ec;
        border-radius: 8px;
        font-size: 11px;
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-decoration: none !important;
    }

    .tjc-form-builder .tjc-builder-field-actions [data-move-field-up],
    .tjc-form-builder .tjc-builder-field-actions [data-move-field-down] {
        position: relative;
        color: transparent !important;
        font-size: 0 !important;
        padding: 0 !important;
    }

    .tjc-form-builder .tjc-builder-field-actions [data-move-field-up]::before,
    .tjc-form-builder .tjc-builder-field-actions [data-move-field-down]::before {
        position: static;
        display: block;
        color: #1f5f8b;
        font-size: 19px !important;
        font-weight: 800;
        line-height: 1;
    }

    .tjc-form-builder .tjc-builder-field-actions [data-move-field-up]::before {
        content: "\2191" !important;
    }

    .tjc-form-builder .tjc-builder-field-actions [data-move-field-down]::before {
        content: "\2193" !important;
    }

    .tjc-form-builder .tjc-builder-field-actions .tjc-link-btn:disabled::before {
        opacity: .4;
    }

    .tjc-form-builder .tjc-builder-field-actions .tjc-link-btn-danger {
        border-color: #efc4c0;
        color: #b42318;
    }
}


/* V5.6 final mobile polish: compact cards and single-line field controls */
.tjc-action-label-mobile{display:none}
@media (max-width:760px){
.tjc-forms-manager .tjc-form-template-card{display:block!important;width:100%!important;min-height:0!important;padding:14px!important;overflow:hidden!important;border-radius:14px!important}
.tjc-forms-manager .tjc-form-template-card::before{display:none!important;content:none!important}
.tjc-forms-manager .tjc-form-template-copy{width:100%!important;padding:0!important}
.tjc-forms-manager .tjc-form-template-title-row{display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;gap:7px 9px!important;width:100%!important}
.tjc-forms-manager .tjc-form-template-card h3{flex:0 1 auto!important;max-width:100%!important;margin:0!important;font-size:16px!important;line-height:1.25!important}
.tjc-forms-manager .tjc-form-status-badge{flex:0 0 auto!important;min-height:22px!important;padding:4px 8px!important;font-size:10px!important}
.tjc-forms-manager .tjc-form-template-card p{margin:7px 0 9px!important;font-size:13px!important;line-height:1.4!important}
.tjc-forms-manager .tjc-form-template-meta{margin:0!important;padding:4px 8px!important;font-size:11px!important}
.tjc-forms-manager .tjc-form-template-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;width:100%!important;margin:12px 0 0!important;padding:10px 0 0!important;border-top:1px solid #e7edf4!important}
.tjc-forms-manager .tjc-form-template-actions .tjc-link-btn{box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:38px!important;height:38px!important;margin:0!important;padding:0 8px!important;border:1px solid #d6e1ec!important;border-radius:9px!important;background:#fff!important;font-size:12px!important;line-height:1!important;text-decoration:none!important}
.tjc-forms-manager .tjc-form-template-actions .tjc-link-btn-danger{border-color:#efc4c0!important}
.tjc-form-builder .tjc-builder-fields{gap:9px!important}
.tjc-form-builder .tjc-builder-field{display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;align-items:start!important;gap:7px 10px!important;min-height:0!important;padding:10px!important;border-radius:12px!important}
.tjc-form-builder .tjc-builder-field-index{width:30px!important;height:30px!important}
.tjc-form-builder .tjc-builder-field-summary{min-width:0!important;padding:0!important}
.tjc-form-builder .tjc-builder-field-summary strong{display:block!important;font-size:14px!important;line-height:1.25!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
.tjc-form-builder .tjc-builder-field-meta{gap:5px!important;margin-top:4px!important;font-size:10px!important}
.tjc-form-builder .tjc-builder-field-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:minmax(64px,1fr) 40px 40px minmax(72px,1fr)!important;align-items:center!important;gap:6px!important;width:100%!important;margin:0!important;padding:8px 0 0!important;border-top:1px solid #e7edf4!important}
.tjc-form-builder .tjc-builder-field-actions .tjc-link-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:34px!important;height:34px!important;margin:0!important;padding:0 7px!important;overflow:hidden!important;border:1px solid #d6e1ec!important;border-radius:8px!important;background:#fff!important;color:#1f5f8b!important;font-size:11px!important;line-height:1!important;white-space:nowrap!important;text-decoration:none!important}
.tjc-form-builder .tjc-builder-field-actions [data-move-field-up],.tjc-form-builder .tjc-builder-field-actions [data-move-field-down]{padding:0!important;color:#1f5f8b!important;font-size:16px!important}
.tjc-form-builder .tjc-builder-field-actions [data-move-field-up]::before,.tjc-form-builder .tjc-builder-field-actions [data-move-field-down]::before{display:none!important;content:none!important}
.tjc-action-label-full{display:none!important}.tjc-action-label-mobile{display:inline!important;color:currentColor!important;font-size:18px!important;font-weight:800!important;line-height:1!important}
.tjc-form-builder .tjc-builder-field-actions .tjc-link-btn-danger{border-color:#efc4c0!important;color:#b42318!important}
}

/* PDF-backed custom forms */
.tjc-form-pdf-card {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    background: #fff;
}

.tjc-form-pdf-card-head,
.tjc-pdf-mapper-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.tjc-form-pdf-card-head h3 {
    margin: 0 0 5px;
    color: #172b4d;
}

.tjc-form-pdf-card-head p,
.tjc-pdf-mapper-head span,
.tjc-form-pdf-file-field small,
.tjc-form-pdf-check small,
.tjc-pdf-map-hint {
    color: #64748b;
    font-size: 12px;
}

.tjc-form-pdf-card-head p {
    margin: 0;
}

.tjc-form-pdf-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.tjc-form-pdf-status.is-active {
    background: #e8f5ec;
    color: #1f6f3f;
}

.tjc-form-pdf-upload-row {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr);
    gap: 14px;
    margin-top: 15px;
}

.tjc-form-pdf-file-field input[type="file"] {
    width: 100%;
    min-height: 42px;
    padding: 7px;
    border: 1px solid #cfd9e5;
    border-radius: 9px;
    background: #f8fafc;
    box-sizing: border-box;
}

.tjc-form-pdf-file-field small {
    min-height: 16px;
}

.tjc-form-pdf-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    background: #f8fafc;
}

.tjc-form-pdf-check input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    flex: 0 0 auto;
}

.tjc-form-pdf-check span,
.tjc-form-pdf-check strong,
.tjc-form-pdf-check small {
    display: block;
}

.tjc-form-pdf-check strong {
    color: #172b4d;
    font-size: 12px;
}

.tjc-form-pdf-check small {
    margin-top: 4px;
    line-height: 1.45;
}

.tjc-form-pdf-remove {
    grid-column: 1 / -1;
    border-color: #f3c7c3;
    background: #fff8f7;
}

.tjc-pdf-mapper {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5ebf2;
}

.tjc-pdf-mapper-head strong,
.tjc-pdf-mapper-head span {
    display: block;
}

.tjc-pdf-mapper-head strong {
    color: #172b4d;
    font-size: 14px;
}

.tjc-pdf-mapper-head span {
    margin-top: 3px;
    line-height: 1.45;
}

.tjc-pdf-mapper-controls {
    display: grid;
    grid-template-columns: minmax(230px, 1.35fr) minmax(120px, 160px) minmax(190px, 1fr) minmax(220px, 1.2fr);
    gap: 12px;
    margin-top: 13px;
}

.tjc-pdf-mapper-controls label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tjc-pdf-mapper-controls label > span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.tjc-pdf-mapper-controls select {
    width: 100%;
    min-height: 41px;
    padding: 8px 10px;
    border: 1px solid #cfd9e5;
    border-radius: 9px;
    background: #fff;
    color: #172b4d;
}

.tjc-pdf-map-stage-wrap {
    margin-top: 13px;
    padding: 12px;
    overflow: auto;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #eef3f8;
    text-align: center;
}

.tjc-pdf-map-stage-wrap.is-zoomed {
    max-height: 78vh;
    text-align: left;
}

.tjc-pdf-map-stage {
    position: relative;
    display: inline-block;
    width: min(100%, 850px);
    line-height: 0;
    cursor: crosshair;
    user-select: none;
    touch-action: none;
    box-shadow: 0 8px 24px rgba(23, 43, 77, .12);
}

.tjc-pdf-map-stage img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}

.tjc-pdf-map-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.tjc-pdf-map-box {
    position: absolute;
    min-width: 3px;
    min-height: 3px;
    border: 2px solid rgba(31, 95, 139, .82);
    background: rgba(31, 95, 139, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 2px 8px rgba(31, 95, 139, .08);
    box-sizing: border-box;
}

.tjc-pdf-map-box.is-active {
    border-color: rgba(47, 125, 50, .95);
    background: rgba(47, 125, 50, .23);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34), 0 2px 10px rgba(47, 125, 50, .16);
}

.tjc-pdf-map-box.is-drawing {
    border-style: dashed;
    background: rgba(31, 95, 139, .21);
}

.tjc-pdf-map-box > span {
    position: absolute;
    top: 2px;
    left: 2px;
    max-width: calc(100% - 4px);
    padding: 2px 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .56);
    border-radius: 4px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .10);
    color: #172b4d;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tjc-pdf-map-hint {
    margin: 9px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
}

.tjc-pdf-map-hint.is-warning {
    border: 1px solid #f0d7a2;
    background: #fff9e8;
    color: #755b16;
    font-weight: 700;
}

.tjc-pdf-map-hint.is-ok {
    border: 1px solid #bfe0c2;
    background: #f1fbf2;
    color: #22642a;
    font-weight: 700;
}

.tjc-pdf-upload-pending {
    margin-top: 13px;
    padding: 11px 12px;
    border: 1px solid #f0d7a2;
    border-radius: 9px;
    background: #fff9e8;
    color: #755b16;
    font-size: 12px;
    font-weight: 700;
}

.tjc-builder-field-auto,
.tjc-builder-field-mapped {
    color: #1f6f3f;
    font-weight: 800;
}

.tjc-builder-field-source-row.is-disabled {
    opacity: .65;
}

.tjc-job-form-autofill {
    padding: 10px 12px;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    background: #f8fafc;
}

.tjc-job-form-auto-value {
    display: block;
    min-height: 21px;
    color: #172b4d;
    font-weight: 700;
    white-space: pre-wrap;
}

.tjc-job-form-auto-value.is-empty {
    color: #64748b;
    font-weight: 600;
}

.tjc-job-form-auto-note {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
}

.tjc-form-signature-preview-auto {
    margin-top: 7px;
    background: #fff;
}

@media (max-width: 700px) {
    .tjc-form-pdf-card-head,
    .tjc-pdf-mapper-head {
        flex-direction: column;
    }

    .tjc-form-pdf-upload-row,
    .tjc-pdf-mapper-controls {
        grid-template-columns: 1fr;
    }

    .tjc-form-pdf-remove {
        grid-column: auto;
    }

    .tjc-pdf-map-stage-wrap {
        padding: 7px;
    }
}

.tjc-pdf-server-warning {
    margin-top: 13px;
    padding: 11px 12px;
    border: 1px solid #f0d7a2;
    border-radius: 9px;
    background: #fff9e8;
    color: #755b16;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

/* Simplified PDF form mapping workflow. */
.tjc-pdf-quick-map-callout{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:0 0 12px;
    padding:11px 13px;
    border:1px solid #cfe0f6;
    border-radius:10px;
    background:#f5f9ff;
    color:#29415f;
}
.tjc-pdf-quick-map-callout strong{flex:0 0 auto;color:#17365f;font-size:13px;}
.tjc-pdf-quick-map-callout span{font-size:12px;line-height:1.45;}
.tjc-pdf-mapper-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.tjc-pdf-zoom-controls{
    display:inline-flex;
    align-items:center;
    gap:0;
    overflow:hidden;
    border:1px solid #c8d5e4;
    border-radius:9px;
    background:#fff;
    box-shadow:0 1px 2px rgba(15,23,42,.05);
}
.tjc-pdf-zoom-controls button{
    min-width:36px;
    height:34px;
    padding:0 10px;
    border:0;
    border-right:1px solid #dbe4ee;
    background:#fff;
    color:#17365f;
    font-size:15px;
    font-weight:800;
    line-height:1;
    cursor:pointer;
}
.tjc-pdf-zoom-controls button:hover:not(:disabled){background:#f1f6fc;}
.tjc-pdf-zoom-controls button:focus-visible{position:relative;z-index:1;outline:2px solid #2f7df4;outline-offset:-2px;}
.tjc-pdf-zoom-controls button:disabled{cursor:not-allowed;opacity:.4;}
.tjc-pdf-zoom-controls .tjc-pdf-zoom-fit{min-width:45px;font-size:11px;}
.tjc-pdf-zoom-controls .tjc-pdf-zoom-button:last-child{border-right:0;border-left:1px solid #dbe4ee;}
.tjc-pdf-zoom-value{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:58px;
    height:34px;
    padding:0 8px;
    background:#f8fafc;
    color:#334155;
    font-size:11px;
    font-weight:800;
    line-height:1;
}
.tjc-form-advanced-fields{
    margin:18px 0 0;
    border:1px solid #d8e3ef;
    border-radius:12px;
    background:#fbfdff;
    overflow:hidden;
}
.tjc-form-advanced-fields > summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 15px;
    cursor:pointer;
    list-style:none;
    background:#f4f8fc;
    color:#172b4d;
}
.tjc-form-advanced-fields > summary::-webkit-details-marker{display:none;}
.tjc-form-advanced-fields > summary:after{content:'+';font-size:20px;font-weight:700;color:#4b6b8f;line-height:1;}
.tjc-form-advanced-fields[open] > summary:after{content:'−';}
.tjc-form-advanced-fields > summary span{display:flex;flex-direction:column;gap:2px;}
.tjc-form-advanced-fields > summary strong{font-size:14px;}
.tjc-form-advanced-fields > summary small{font-size:11px;font-weight:400;color:#64748b;line-height:1.35;}
.tjc-form-advanced-fields-body{padding:14px;}
.tjc-pdf-quick-source-control select{font-weight:700;}

@media (max-width: 700px){
    .tjc-pdf-quick-map-callout{flex-direction:column;gap:4px;}
    .tjc-pdf-mapper-actions{justify-content:flex-start;}
    .tjc-pdf-zoom-controls{width:100%;max-width:260px;}
    .tjc-pdf-zoom-controls button{min-width:44px;height:40px;}
    .tjc-pdf-zoom-value{flex:1;height:40px;}
    .tjc-form-advanced-fields > summary{align-items:flex-start;}
}

/* Premium status language: plain text + dot, no pill backgrounds. */
.tjc-form-status-badge{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#159447!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1.2!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
  white-space:nowrap!important;
}
.tjc-form-status-badge::before{
  content:'';
  flex:0 0 auto;
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}
.tjc-form-status-badge.is-active,
.tjc-form-status-badge.is-completed{color:#159447!important}
.tjc-form-status-badge.is-draft{color:#d99a00!important}
.tjc-form-status-badge.is-inactive{color:#d62f2f!important}

/* === JobCardHub Graphite Luxe: Custom Forms manager v0.13.90 === */
body.tjc-office-dashboard-active .tjc-forms-manager {
    color: #24364f;
}
body.tjc-office-dashboard-active .tjc-forms-manager-head {
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
body.tjc-office-dashboard-active .tjc-forms-manager-head h2 {
    margin: 0;
    color: #17365d;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.015em;
}
body.tjc-office-dashboard-active .tjc-forms-manager-head p {
    margin: 3px 0 0;
    color: #6c7e93;
    font-size: 12px;
    line-height: 1.45;
}
body.tjc-office-dashboard-active .tjc-forms-manager-head .tjc-button-primary {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    background: #0b6ffb;
    border-color: #0b6ffb;
    box-shadow: 0 5px 12px rgba(11,111,251,.16);
    font-size: 12px;
    font-weight: 850;
}
body.tjc-office-dashboard-active .tjc-form-template-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-card {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    min-height: 0 !important;
    padding: 15px !important;
    border: 1px solid #d8e1eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-card::before {
    display: none !important;
    content: none !important;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-card h3 {
    min-width: 0;
    margin: 0 !important;
    color: #17365d;
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 850;
    letter-spacing: -.01em;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-card p {
    margin: 6px 0 8px !important;
    color: #687b91;
    font-size: 11.5px !important;
    line-height: 1.45 !important;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-meta {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #76879a !important;
    font-size: 10.5px !important;
    font-weight: 750 !important;
    line-height: 1.2;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-meta::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: #98a6b7;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-status-badge {
    flex: 0 0 auto !important;
    font-size: 9.5px !important;
    font-weight: 900 !important;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions {
    justify-content: flex-start;
    gap: 7px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #e8edf3;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions .tjc-link-btn {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #cfd9e5;
    border-radius: 8px;
    background: #fff;
    color: #17365d;
    font-size: 11px;
    font-weight: 850;
    text-decoration: none !important;
    box-sizing: border-box;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions .tjc-link-btn:hover,
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions .tjc-link-btn:focus {
    border-color: #aebed0;
    background: #f8fafc;
    color: #0b56b3;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions .tjc-link-btn-danger {
    border-color: #f0a7a7;
    color: #c52f2f;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions .tjc-link-btn-danger:hover,
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions .tjc-link-btn-danger:focus {
    border-color: #d93636;
    background: #d93636;
    color: #fff;
}

@media (max-width: 900px) {
    body.tjc-office-dashboard-active .tjc-form-template-list {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 700px) {
    body.tjc-office-dashboard-active .tjc-forms-manager-head {
        align-items: stretch;
        flex-direction: column;
    }
    body.tjc-office-dashboard-active .tjc-forms-manager-head .tjc-button-primary {
        width: 100%;
    }
    body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-card {
        padding: 13px !important;
    }
}

/* === JobCardHub Graphite Luxe: Custom Form build service v0.13.91 === */
body.tjc-office-dashboard-active .tjc-form-build-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: start;
    margin: 0 0 12px;
    padding: 11px 13px;
    border: 1px solid #d8e1eb;
    border-left-width: 3px;
    border-radius: 9px;
    background: #fff;
    color: #314761;
    font-size: 11.5px;
    line-height: 1.45;
}
body.tjc-office-dashboard-active .tjc-form-build-notice::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: #0b6ffb;
}
body.tjc-office-dashboard-active .tjc-form-build-notice strong {
    grid-column: 2;
    color: #17365d;
    font-size: 12px;
    font-weight: 850;
}
body.tjc-office-dashboard-active .tjc-form-build-notice span { grid-column: 2; }
body.tjc-office-dashboard-active .tjc-form-build-notice.is-success {
    border-left-color: #16a45b;
}
body.tjc-office-dashboard-active .tjc-form-build-notice.is-success::before { background: #16a45b; }
body.tjc-office-dashboard-active .tjc-form-build-notice.is-error {
    border-left-color: #d93636;
}
body.tjc-office-dashboard-active .tjc-form-build-notice.is-error::before { background: #d93636; }

body.tjc-office-dashboard-active .tjc-form-build-service {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
    gap: 22px;
    align-items: stretch;
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid #d8e1eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
}
body.tjc-office-dashboard-active .tjc-form-build-service-copy {
    min-width: 0;
    padding: 2px 2px 2px 0;
}
body.tjc-office-dashboard-active .tjc-form-build-service-kicker {
    display: block;
    margin: 0 0 5px;
    color: #967019;
    font-size: 9.5px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
}
body.tjc-office-dashboard-active .tjc-form-build-service h2 {
    margin: 0;
    color: #17365d;
    font-size: 18px;
    line-height: 1.28;
    font-weight: 850;
    letter-spacing: -.015em;
}
body.tjc-office-dashboard-active .tjc-form-build-service-copy > p {
    max-width: 690px;
    margin: 7px 0 0;
    color: #65788f;
    font-size: 12px;
    line-height: 1.55;
}
body.tjc-office-dashboard-active .tjc-form-build-service-points {
    display: grid;
    gap: 7px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
body.tjc-office-dashboard-active .tjc-form-build-service-points li {
    position: relative;
    margin: 0;
    padding-left: 16px;
    color: #425875;
    font-size: 11px;
    line-height: 1.4;
}
body.tjc-office-dashboard-active .tjc-form-build-service-points li::before {
    content: "";
    position: absolute;
    left: 1px;
    top: .52em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0b6ffb;
}
body.tjc-office-dashboard-active .tjc-form-build-latest {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 15px;
    color: #5e7188;
}
body.tjc-office-dashboard-active .tjc-form-build-latest-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: #d99a00;
}
body.tjc-office-dashboard-active .tjc-form-build-latest.is-completed .tjc-form-build-latest-dot { background: #16a45b; }
body.tjc-office-dashboard-active .tjc-form-build-latest > span:last-child {
    display: grid;
    gap: 2px;
}
body.tjc-office-dashboard-active .tjc-form-build-latest strong {
    color: #334b68;
    font-size: 11px;
    font-weight: 850;
}
body.tjc-office-dashboard-active .tjc-form-build-latest small {
    color: #8291a3;
    font-size: 10px;
}

body.tjc-office-dashboard-active .tjc-form-build-service-form {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 15px;
    border: 1px solid #e1e7ee;
    border-radius: 9px;
    background: #f9fbfd;
}
body.tjc-office-dashboard-active .tjc-form-build-field {
    display: grid;
    gap: 6px;
    margin: 0;
}
body.tjc-office-dashboard-active .tjc-form-build-field > span {
    color: #344c69;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: .035em;
    text-transform: uppercase;
}
body.tjc-office-dashboard-active .tjc-form-build-field > span em {
    color: #8391a2;
    font-style: normal;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
body.tjc-office-dashboard-active .tjc-form-build-field input[type="file"],
body.tjc-office-dashboard-active .tjc-form-build-field textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #cfd9e5;
    border-radius: 8px;
    background: #fff;
    color: #233a57;
    font: inherit;
    font-size: 12px;
    outline: none;
}
body.tjc-office-dashboard-active .tjc-form-build-field input[type="file"] {
    min-height: 40px;
    padding: 4px 7px;
}
body.tjc-office-dashboard-active .tjc-form-build-field input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-right: 9px;
    padding: 0 11px;
    border: 1px solid #cbd7e4;
    border-radius: 7px;
    background: #fff;
    color: #17365d;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
body.tjc-office-dashboard-active .tjc-form-build-field input[type="file"]::file-selector-button:hover {
    border-color: #aebed0;
    background: #f4f7fa;
}
body.tjc-office-dashboard-active .tjc-form-build-field textarea {
    min-height: 76px;
    resize: vertical;
    padding: 9px 10px;
    line-height: 1.45;
}
body.tjc-office-dashboard-active .tjc-form-build-field input[type="file"]:focus,
body.tjc-office-dashboard-active .tjc-form-build-field textarea:focus {
    border-color: #75a7e8;
    box-shadow: 0 0 0 2px rgba(11,111,251,.08);
}
body.tjc-office-dashboard-active .tjc-form-build-field small,
body.tjc-office-dashboard-active .tjc-form-build-privacy {
    color: #8291a3;
    font-size: 9.5px;
    line-height: 1.4;
}
body.tjc-office-dashboard-active .tjc-form-build-submit {
    justify-self: start;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 8px;
    background: #0b6ffb;
    border-color: #0b6ffb;
    color: #fff;
    box-shadow: 0 5px 12px rgba(11,111,251,.15);
    font-size: 11.5px;
    font-weight: 850;
}
body.tjc-office-dashboard-active .tjc-form-build-submit:hover,
body.tjc-office-dashboard-active .tjc-form-build-submit:focus {
    background: #095fd7;
    border-color: #095fd7;
}
body.tjc-office-dashboard-active .tjc-form-build-privacy {
    display: block;
    max-width: 620px;
}

@media (max-width: 900px) {
    body.tjc-office-dashboard-active .tjc-form-build-service {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
}
@media (max-width: 700px) {
    body.tjc-office-dashboard-active .tjc-form-build-service {
        margin-bottom: 14px;
        padding: 13px;
        border-radius: 9px;
    }
    body.tjc-office-dashboard-active .tjc-form-build-service h2 {
        font-size: 16px;
    }
    body.tjc-office-dashboard-active .tjc-form-build-service-copy > p {
        font-size: 11.5px;
    }
    body.tjc-office-dashboard-active .tjc-form-build-service-form {
        padding: 12px;
    }
    body.tjc-office-dashboard-active .tjc-form-build-submit {
        width: 100%;
        justify-content: center;
    }
}

/* === JobCardHub Custom Forms portable import/export v0.14.23 === */
.tjc-forms-manager-head-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}
body.tjc-office-dashboard-active .tjc-forms-manager-head-actions .tjc-button-secondary{
    min-height:38px;
    padding:0 14px;
    border-radius:8px;
    border:1px solid #cfd9e5;
    background:#fff;
    color:#17365d;
    font-size:12px;
    font-weight:850;
    box-shadow:none;
}
body.tjc-office-dashboard-active .tjc-forms-manager-head-actions .tjc-button-secondary:hover,
body.tjc-office-dashboard-active .tjc-forms-manager-head-actions .tjc-button-secondary:focus{
    border-color:#aebed0;
    background:#f8fafc;
    color:#0b56b3;
}
body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
@media (max-width:700px){
    .tjc-forms-manager-head-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr 1fr;
    }
    body.tjc-office-dashboard-active .tjc-forms-manager-head-actions .tjc-button{
        width:100%;
    }
    body.tjc-office-dashboard-active .tjc-forms-manager .tjc-form-template-actions{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

/* Native form completion polish: compact checks and signature actions. */
.tjc-job-form-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 5px 0 8px;
    cursor: pointer;
    box-sizing: border-box;
}

.tjc-job-form-check-row > input[type="checkbox"] {
    -webkit-appearance: auto;
    appearance: auto;
    flex: 0 0 auto;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    margin: 1px 0 0 !important;
    padding: 0 !important;
    accent-color: #2563eb;
    cursor: pointer;
}

.tjc-job-form-check-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
    line-height: 1.35;
}

.tjc-job-form-check-copy .tjc-job-form-label {
    margin: 0;
}

.tjc-job-form-check-copy small {
    display: block;
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.tjc-form-signature-actions {
    gap: 8px;
    margin-top: 8px;
}

.tjc-form-signature-actions .tjc-button.tjc-button-secondary {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    background: #fff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: none;
}

.tjc-form-signature-actions .tjc-button.tjc-button-secondary:hover,
.tjc-form-signature-actions .tjc-button.tjc-button-secondary:focus-visible {
    border-color: #1d4ed8;
    background: #eff6ff;
    color: #1e40af;
}

.tjc-form-signature-actions .tjc-link-btn-danger {
    min-height: 36px;
    padding: 7px 4px;
    border: 0;
    background: transparent;
    color: #b42318;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 640px) {
    .tjc-job-form-check-row > input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
    }
}


/* v0.15.10: mobile fix for attached forms/checklists rows on new job screen */
.tjc-new-job-selected-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}
.tjc-new-job-selected-item > span {
    min-width: 0;
}
.tjc-new-job-selected-item > span strong,
.tjc-new-job-selected-item > span small {
    display: block;
    overflow-wrap: anywhere;
}
.tjc-new-job-selected-item .tjc-link-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .tjc-new-job-selected-item {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    .tjc-new-job-selected-item .tjc-link-btn {
        width: 100%;
        min-height: 44px;
        padding: 0 14px;
        border: 1px solid #cfd9e5;
        border-radius: 10px;
        background: #f3f7ff;
        text-decoration: none !important;
    }
}
