/* Corofil QA (QFL-IMS-QF-007) */

.cf-subh {
    margin: 14px 0 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

#instCard.pre-gate-lock {
    opacity: 0.72;
    position: relative;
}
#instCard.pre-gate-lock::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        rgba(148, 163, 184, 0.08),
        rgba(148, 163, 184, 0.08) 8px,
        transparent 8px,
        transparent 16px
    );
    pointer-events: none;
    border-radius: inherit;
}

.cf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 8px;
}
.cf-table th {
    text-align: left;
    color: #64748b;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px;
}
.cf-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.cf-table .cf-num { width: 28px; color: #94a3b8; }
.cf-table .cf-tick { width: 44px; text-align: center; }
.cf-table .cf-ans { width: 170px; }
.cf-table .cf-photos-cell { width: 170px; }
.cf-table textarea {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}

.cf-tickbtn {
    width: 28px;
    height: 28px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: transparent;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}
.cf-tickbtn.on {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.cf-tickbtn.on::after { content: "\2713"; }
.cf-tickbtn:disabled { cursor: default; opacity: 0.7; }

.cf-group-head td {
    background: #f1f5f9;
    color: #0c1248;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
}
.cf-req-row.cf-needs-photos { background: #fff7ed; }
.cf-req-row.cf-needs-answer { background: #fef2f2; }

.cf-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.cf-thumb {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
    padding: 0;
    cursor: zoom-in;
}
.cf-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cf-thumb-del {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.cf-photo-add {
    padding: 4px 8px !important;
    min-width: 0;
    font-size: 0.75rem;
}
.cf-photo-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    width: 100%;
}
.cf-photo-count.short { color: #c2410c; }

.cf-banner {
    background: #fef2f2;
    border-color: #fecaca;
}
.cf-banner strong {
    display: block;
    color: #b91c1c;
    font-size: 0.9rem;
    line-height: 1.35;
}
.cf-banner p {
    margin: 6px 0 0;
    color: #7f1d1d;
    font-size: 0.82rem;
}

.cf-drawings {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}
.cf-drawings li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
}
.cf-drawings .ops-btn { padding: 2px 8px; min-width: 0; }

.cf-pad-wrap { margin-top: 10px; }
.cf-pad {
    display: block;
    width: 100%;
    max-width: 640px;
    height: 170px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}
.cf-pad-actions { display: flex; gap: 8px; margin-top: 8px; }
.cf-sig-preview {
    display: block;
    max-height: 80px;
    margin-top: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px;
}

/* Lightbox */
.cf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px 40px;
}
.cf-lightbox[hidden] { display: none !important; }
.cf-lightbox img {
    max-width: min(96vw, 1100px);
    max-height: calc(100vh - 100px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.cf-lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.cf-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}
.cf-lightbox-nav.prev { left: 12px; }
.cf-lightbox-nav.next { right: 12px; }
.cf-lightbox-meta {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.8rem;
}

@media (max-width: 720px) {
    .cf-table, .cf-table tbody, .cf-table tr, .cf-table td { display: block; width: auto; }
    .cf-table thead { display: none; }
    .cf-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 8px;
        margin-bottom: 10px;
    }
    .cf-table td { border: 0; padding: 4px 2px; }
    .cf-group-head { border-radius: 8px; }
    .cf-ans, .cf-photos-cell { width: auto; }
}

/* Shared with Supports QA */
.cf-group-sub {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}
.cf-drawing-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 18px;
    margin-top: 8px;
}
.cf-draw-group .cf-drawings li { font-size: 0.78rem; color: #334155; }
