.tjc-technician-form-assignments {
    margin: 0 0 18px;
    padding: 20px;
    border: 1px solid #dbe6f1;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.tjc-technician-form-assignments-head h2,
.tjc-techforms-page-head h2,
.tjc-techforms-folder-view-title h2 {
    margin: 0;
    color: #17345d;
    font-size: 24px;
    line-height: 1.15;
}

.tjc-technician-form-assignments-head p,
.tjc-techforms-page-head p,
.tjc-techforms-create-card p,
.tjc-techforms-folder-view-title p {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.tjc-technician-form-assignments-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.tjc-technician-form-assignments-form > label,
.tjc-techforms-create-form > label,
.tjc-techforms-folder-edit label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.tjc-technician-form-assignments-form label > span,
.tjc-techforms-create-form label > span,
.tjc-techforms-folder-edit label > span {
    color: #263b59;
    font-size: 13px;
    font-weight: 850;
}

.tjc-technician-form-assignments-form select,
.tjc-techforms-create-form input,
.tjc-techforms-create-form select,
.tjc-techforms-folder-edit input,
.tjc-techforms-folder-edit select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #cdd9e7;
    border-radius: 11px;
    background: #fff;
    color: #24324a;
    box-sizing: border-box;
}

.tjc-techforms-locked-team {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #dbe6f1;
    border-radius: 11px;
    background: #f4f7fb;
    color: #263b59;
    box-sizing: border-box;
}

.tjc-techforms-folder-edit label > small {
    color: #718198;
    font-size: 12px;
    line-height: 1.4;
}

.tjc-technician-form-assignments-form small {
    color: #718198;
    line-height: 1.4;
}

.tjc-technician-form-assignments-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tjc-technician-form-assignments-note {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    color: #5e7088;
    font-size: 13px;
    line-height: 1.5;
}

.tjc-form-message.is-success {
    color: #237a38;
    font-weight: 800;
}

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

.tjc-form-message.is-busy {
    color: #52657d;
    font-weight: 750;
}

.tjc-technician-forms-admin {
    display: grid;
    gap: 16px;
}

.tjc-techforms-page-head,
.tjc-techforms-folder-view-head {
    display: grid;
    gap: 13px;
}

.tjc-techforms-create-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(420px, 1.35fr);
    gap: 22px;
    align-items: end;
    padding: 18px;
    border: 1px solid #dbe6f1;
    border-radius: 16px;
    background: #fff;
}

.tjc-techforms-create-card h3,
.tjc-techforms-folder-card h3 {
    margin: 0;
    color: #19375f;
    font-size: 18px;
}

.tjc-techforms-create-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.tjc-techforms-create-form .tjc-button {
    min-height: 44px;
    white-space: nowrap;
}

.tjc-techforms-empty {
    display: grid;
    gap: 6px;
    padding: 28px 18px;
    border: 1px dashed #cbd9e8;
    border-radius: 16px;
    background: #f8fbff;
    color: #65778f;
    text-align: center;
}

.tjc-techforms-empty strong {
    color: #294566;
    font-size: 16px;
}

.tjc-techforms-folder-grid,
.tjc-techforms-file-list {
    display: grid;
    gap: 12px;
}

.tjc-techforms-folder-card,
.tjc-techforms-file-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #dce6f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.tjc-techforms-folder-icon,
.tjc-techforms-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #edf5ff;
    font-size: 24px;
}

.tjc-techforms-folder-copy,
.tjc-techforms-file-copy {
    min-width: 0;
}

.tjc-techforms-folder-team {
    margin-top: 5px;
    color: #2e4665;
    font-weight: 800;
}

.tjc-techforms-folder-vehicle,
.tjc-techforms-folder-stats,
.tjc-techforms-file-meta {
    color: #6a7b91;
    font-size: 13px;
    line-height: 1.45;
}

.tjc-techforms-folder-stats,
.tjc-techforms-file-meta {
    display: flex;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tjc-techforms-folder-actions,
.tjc-techforms-file-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.tjc-techforms-folder-actions form,
.tjc-techforms-file-actions form {
    margin: 0;
}

.tjc-techforms-folder-edit {
    position: relative;
}

.tjc-techforms-folder-edit > summary {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d3dfeb;
    border-radius: 10px;
    background: #fff;
    color: #334e70;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.tjc-techforms-folder-edit > summary::-webkit-details-marker {
    display: none;
}

.tjc-techforms-folder-edit[open] > form {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 8px);
    display: grid;
    gap: 10px;
    width: min(330px, calc(100vw - 40px));
    padding: 14px;
    border: 1px solid #ccd9e7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.tjc-techforms-folder-view-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.tjc-techforms-file-title-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    flex-wrap: wrap;
}

.tjc-techforms-file-title-row strong {
    min-width: 0;
    color: #243a5a;
    overflow-wrap: anywhere;
}

.tjc-techforms-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #e8f2ff;
    color: #245ea9;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tjc-techforms-type-badge.is-vehicle_inspection {
    background: #edf8e9;
    color: #367a25;
}

.tjc-technician-form-page {
    max-width: 940px;
    margin: 0 auto;
    padding: 12px;
}

.tjc-technician-form-page-top {
    margin-bottom: 12px;
}

.tjc-technician-form-shell {
    overflow: hidden;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    border: 1px solid #d9e4ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.tjc-technician-form-head {
    padding: 20px 22px;
    border-top: 7px solid #65b846;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.tjc-technician-form-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf8e9;
    color: #367a25;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tjc-technician-form-head h2 {
    margin: 10px 0 0;
    color: #17345d;
    font-size: 25px;
    line-height: 1.15;
}

.tjc-technician-form-head p {
    margin: 7px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.tjc-technician-form-auto-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border-bottom: 1px solid #dfe8f2;
    background: #dfe8f2;
}

.tjc-technician-form-auto-detail {
    min-width: 0;
    padding: 12px 15px;
    background: #f8fbff;
}

.tjc-technician-form-auto-detail span {
    display: block;
    color: #718198;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.tjc-technician-form-auto-detail strong {
    display: block;
    margin-top: 4px;
    color: #183a66;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.tjc-technician-form-shell > .tjc-notice-error,
.tjc-technician-form-shell > .tjc-notice-success {
    margin: 16px 22px 0;
}

.tjc-technician-form {
    padding: 20px 22px;
}

.tjc-technician-form-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.tjc-technician-form-photos {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #d9e4f2;
    border-radius: 13px;
    background: #f8fbff;
}

.tjc-technician-form-photos strong {
    display: block;
    color: #183a66;
}

.tjc-technician-form-photos small {
    display: block;
    margin-top: 4px;
    color: #718198;
    line-height: 1.4;
}

.tjc-technician-form-photo-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: max-content;
    max-width: 100%;
    padding: 0 16px;
    border: 1px dashed #9fb7d1;
    border-radius: 11px;
    background: #fff;
    color: #2f5d91;
    font-weight: 850;
    cursor: pointer;
    box-sizing: border-box;
}

.tjc-technician-form-photo-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tjc-technician-form-photo-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.tjc-technician-form-photo-item {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    max-width: 100%;
    padding: 0 10px;
    border-radius: 999px;
    background: #eaf2fb;
    color: #3b5576;
    font-size: 12px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.tjc-technician-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 20px -22px -20px;
    padding: 14px 22px;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
}

.tjc-technician-form.is-submitting {
    pointer-events: none;
    opacity: 0.82;
}

.tjc-technician-form-error {
    display: grid;
    gap: 12px;
    max-width: 780px;
    margin: 16px auto;
    padding: 18px;
    border: 1px solid #dce6f0;
    border-radius: 16px;
    background: #fff;
}

.tjc-tech-menu-entry--vehicle .tjc-tech-menu-entry-icon {
    background: #edf8e9;
    color: #367a25;
}

.tjc-job-risk-assessment-panel {
    margin-bottom: 14px;
}

.tjc-job-risk-assessment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tjc-job-risk-assessment-head h3 {
    margin: 0;
}

.tjc-job-risk-assessment-head p {
    margin: 5px 0 0;
    color: #64748b;
    line-height: 1.45;
}

.tjc-job-risk-files {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.tjc-job-risk-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #dce6f0;
    border-radius: 11px;
    background: #f8fbff;
}

.tjc-job-risk-file span:first-child {
    display: grid;
    gap: 3px;
}

.tjc-job-risk-file small {
    color: #6b7c91;
}

@media (max-width: 980px) {
    .tjc-techforms-create-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tjc-technician-form-assignments,
    .tjc-techforms-create-card {
        padding: 14px;
    }

    .tjc-technician-form-assignments-form,
    .tjc-techforms-create-form,
    .tjc-technician-form-fields {
        grid-template-columns: 1fr;
    }

    .tjc-technician-form-assignments-actions {
        grid-column: auto;
        align-items: stretch;
        flex-direction: column;
    }

    .tjc-techforms-folder-card,
    .tjc-techforms-file-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tjc-techforms-folder-actions,
    .tjc-techforms-file-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 10px;
        border-top: 1px solid #edf1f5;
    }

    .tjc-technician-form-page {
        padding: 6px;
    }

    .tjc-technician-form-head,
    .tjc-technician-form {
        padding-left: 14px;
        padding-right: 14px;
    }

    .tjc-technician-form-head h2 {
        font-size: 21px;
    }

    .tjc-technician-form-auto-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tjc-technician-form-actions {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
        align-items: stretch;
        flex-direction: column;
    }

    .tjc-technician-form-actions .tjc-button {
        width: 100%;
        box-sizing: border-box;
    }

    .tjc-technician-form-shell > .tjc-notice-error,
    .tjc-technician-form-shell > .tjc-notice-success {
        margin-left: 14px;
        margin-right: 14px;
    }

    .tjc-job-risk-assessment-head,
    .tjc-job-risk-file {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tjc-technician-form-auto-details {
        grid-template-columns: 1fr;
    }

    .tjc-techforms-folder-card,
    .tjc-techforms-file-card {
        grid-template-columns: 1fr;
    }

    .tjc-techforms-folder-icon,
    .tjc-techforms-file-icon {
        width: 42px;
        height: 42px;
    }

    .tjc-techforms-folder-actions,
    .tjc-techforms-file-actions {
        grid-column: auto;
    }

    .tjc-techforms-folder-actions .tjc-button,
    .tjc-techforms-file-actions .tjc-button {
        width: 100%;
        box-sizing: border-box;
    }

    .tjc-techforms-folder-edit,
    .tjc-techforms-folder-edit > summary {
        width: 100%;
        box-sizing: border-box;
    }

    .tjc-techforms-folder-edit > summary {
        justify-content: center;
    }
}

.tjc-layout-forms > .tjc-job-risk-assessment-panel {
    margin-bottom: 14px !important;
}


/* Consistent archive action controls. */
.tjc-techforms-folder-actions > .tjc-button,
.tjc-techforms-folder-edit > summary,
.tjc-techforms-file-actions > .tjc-button,
.tjc-techforms-file-actions > .tjc-link-btn,
.tjc-techforms-file-actions > form > .tjc-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.tjc-techforms-folder-actions > .tjc-button,
.tjc-techforms-folder-edit > summary {
    min-width: 118px;
}

.tjc-techforms-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    box-sizing: border-box;
    text-decoration: none;
}

/* Keep the folder-view back control compact and visually secondary. */
.tjc-techforms-folder-view-head > .tjc-techforms-back-button {
    width: auto !important;
    max-width: max-content;
    justify-self: start;
    align-self: start;
    margin: 0 0 16px;
    padding: 0 16px;
    border: 1px solid #cbd9e8;
    background: #ffffff;
    color: #245ea9;
    box-shadow: none;
}

.tjc-techforms-folder-view-head > .tjc-techforms-back-button:hover,
.tjc-techforms-folder-view-head > .tjc-techforms-back-button:focus {
    border-color: #9fb7d1;
    background: #f4f8fc;
    color: #174f91;
}
