.job-manager .jobs .header,
.job-manager .jobs .job-line {
    display: grid;
    grid-template-columns: 3rem 2fr 1fr 100px 80px 80px 8rem 8rem;
    gap: .5rem;
    align-items: center;
    padding-left:10px;
    padding-right:10px;
}

[data-mode="BoatJobs"].job-manager .jobs .job-line, [data-mode='BoatJobs'].job-manager .jobs .header{
     grid-template-columns: 3rem 2fr 100px 80px 80px 8rem;
   }
[data-mode="BoatJobs"].job-manager .job-line div:nth-child(3),
[data-mode="BoatJobs"].job-manager .job-line div:nth-child(7),
[data-mode="BoatJobs"].job-manager .header div:nth-child(3),
[data-mode="BoatJobs"].job-manager .header div:nth-child(7)
{
display:none;
}

[data-mode="BoatJobs"] .filter-group-owner {display:none;}


.job-manager .jobs .header {
    font-weight: 600;
    border-bottom: 1px solid #000;
    border-top: 1px solid #000;
    cursor: pointer;
    background:aliceblue;
    font-size:0.8rem;
    
}
.job-manager{
    margin-left:-12px;
    margin-right:-12px;
}

[data-mode="BoatJobs"].job-manager{
    margin:0;
}

.jobsLines > div:nth-child(2n){
    background-color:aliceblue;
}

.job-manager .jobs .job-line {
    padding: .5rem 5px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

    .job-manager .jobs .job-line:hover {
        background: #f7f7f7;
    }

.job-manager .job-line.amber {
    border-left: 4px solid #f0ad4e;
    padding-left: .5rem;
}

.job-manager .job-line.red {
    border-left: 4px solid #d9534f;
    padding-left: .5rem;
    color:black;
    background:#ff00000d;
}

.completed,
.invoiced {
    text-align: center;
    font-weight: 700;
}

.job-filter{
    display:flex;
    column-gap:10px;
    padding:5px;
    background-color:#777;
    justify-content: space-around;
    flex-wrap: wrap;
    row-gap:5px;
}

.job-filter select {
    padding:5px 40px 5px 5px;
    font-weight:600;
    font-size:1rem;
    border-radius:3px;
    width: fit-content;
}

@media(max-width:1080px){
    .job-line > div:nth-child(7), .header > div:nth-child(7){display:none;}
    .job-line > div:nth-child(8), .header > div:nth-child(8){display:none;}
    .job-manager .jobs .header,
    .job-manager .jobs .job-line {
        display: grid;
        grid-template-columns: 2rem 2fr 0.8fr 100px 80px 80px;
        gap: .3rem;
        align-items: center;
        padding-left:10px;
        padding-right:10px;
        font-size:0.8rem;
    }
    [data-mode="BoatJobs"].job-manager .header, [data-mode="BoatJobs"].job-manager .job-line{
        grid-template-columns: 2rem 2fr 0.8fr 80px 80px;
    }
    [data-mode="BoatJobs"].job-manager.job-line > div:nth-child(8),[data-mode="BoatJobs"].job-manager .header > div:nth-child(8){display:flex;}

}

/* Base badge style */
.line .completed::after,
.line .invoiced::after {
    display: none;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 4px;
}

@media(max-width:650px){
    .job-filter{
        flex-wrap:wrap;
        row-gap:4px;
        column-gap:5px;
               }
    .job-filter > div{
        display:flex;
        width:48%;
        flex-basis:48%;
        flex-shrink:0;
        
    }
    .job-filter > div select{
        width:100%;
    }
    .job-line{
        grid-template-columns: 6fr;        
    }
    .job-line > div:nth-child(1){
        grid-row:1 / span 2;
    }
    .job-line > div:nth-child(2), .header > div:nth-child(2){
        grid-row:1;
        grid-column:2 / span 4;
        font-weight:700;
    }
    .job-line > div:nth-child(4){
        grid-row:2;
        grid-column:2 / span 3;
    }
    .job-line > div:nth-child(4)::before{
        content:'Due: ';
    }
    .header > div:nth-child(n+4){
        display:none;
    }

    /* Hide icons */
    .job-line .status-icon {
        display: none;
    }

    /* Badge base */
    .job-line .completed::after,
    .job-line .invoiced::after {
        display: inline-block;
        padding: 0.15rem 0.45rem;
        border-radius: 0.35rem;
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
    }

    /* Completed */
    .job-line.is-completed .completed::after {
        content: "Completed";
        background: #d4edda;
        color: #155724;
    }

    .job-line.not-completed .completed::after {
        content: "Not Comp.";
        background: #f8d7da;
        color: #721c24;
    }

    /* Invoiced */
    .job-line.is-invoiced .invoiced::after {
        content: "Invoiced";
        background: #d4edda;
        color: #155724;
    }

    .job-line.not-invoiced .invoiced::after {
        content: "Not Inv.";
        background: #f8d7da;
        color: #721c24;
    }
}




/* Invoice link shown on completed, not-yet-invoiced jobs (opens the invoice builder for that job) */
.job-manager .invoice-link {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 0.35rem;
    background: #0d6efd;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.job-manager .invoice-link:hover {
    background: #0b5ed7;
    color: #fff;
}

/* On narrow screens the status text badge is drawn with ::after; the button replaces it */
.job-line.can-invoice .invoiced::after {
    content: none;
}
