.jobs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

#jobs-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 14px !important;
}

.job-card-batch-d {
    position: relative;
    min-width: 0;
}

.job-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.job-lifecycle-badge,
.job-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.job-lifecycle-badge.published { background: #DCFCE7; color: #166534; }
.job-lifecycle-badge.stopped { background: #E2E8F0; color: #475569; }
.job-lifecycle-badge.draft { background: #FEF3C7; color: #92400E; }
.job-type-badge { background: #E0E7FF; color: #3730A3; }

.job-card-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.job-card-count {
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    border-radius: 6px;
    padding: 9px 10px;
}

.job-card-count strong { display: block; color: #0F172A; font-size: 1.1rem; }
.job-card-count span { color: #64748B; font-size: 0.76rem; }

.job-menu-wrap { position: relative; }
.job-menu-button { width: 36px; height: 36px; padding: 0; justify-content: center; }
.job-card-menu {
    position: absolute;
    z-index: 15;
    top: 40px;
    right: 0;
    width: 190px;
    padding: 6px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}
.job-card-menu[hidden] { display: none; }
.job-card-menu button {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 9px 10px;
    display: flex;
    gap: 9px;
    align-items: center;
    border-radius: 4px;
    color: #334155;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.job-card-menu button:hover { background: #F1F5F9; }
.job-card-menu button.danger { color: #B91C1C; }

#modal-job-form .modal-content {
    width: min(900px, 95%);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#form-job {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.job-form-sections {
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}
.job-form-section {
    margin: 0 0 10px;
    border: 1px solid #D7E0EA;
    border-radius: 6px;
    background: #FFFFFF;
}
.job-form-section summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 700;
    color: #1E293B;
    background: #F8FAFC;
    border-radius: 6px;
    list-style-position: inside;
}
.job-form-section[open] summary { border-bottom: 1px solid #D7E0EA; border-radius: 6px 6px 0 0; }
.job-form-section-body { padding: 16px; }
.job-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.job-form-grid > .form-group { margin: 0; }
.job-form-sticky-footer {
    z-index: 4;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 2px 2px;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
}
.job-autosave-status { margin-right: auto; align-self: center; color: #64748B; font-size: 0.8rem; }
.job-flyer-readiness { margin: 10px 0; padding: 10px 12px; border-radius: 6px; font-size: 0.84rem; }
.job-flyer-readiness.warning { background: #FFF7ED; color: #9A3412; border: 1px solid #FED7AA; }
.job-flyer-readiness.ready { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.job-ai-notice { padding: 10px 12px; background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 6px; color: #1E3A8A; font-size: 0.82rem; }

@media (max-width: 767px) {
    #jobs-list { grid-template-columns: minmax(0, 1fr) !important; }
    .jobs-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }
    .jobs-header .btn-primary {
        width: 100%;
        justify-content: center;
    }
    .job-form-grid { grid-template-columns: minmax(0, 1fr); }
    .job-form-sticky-footer { flex-wrap: wrap; }
    .job-autosave-status { flex-basis: 100%; }
}
