/* =============================================================================
 * job.css — Ops v4 · A2's two screens: the job page and the crew calendar.
 *
 * LAYOUT ONLY. Every colour that carries MEANING comes from
 * window.LRESOpsV4Kit — the four status colours, the date-tile palette and the
 * ring are set inline by the kit at render time, and nothing in this file
 * overrides them. That is the rule in CONTRACTS §9: agents use the kit and do
 * not restyle it. What is here is grid, spacing and the neutral surfaces the
 * boards show (white cards on #F4F5F7, 16–24px radii, Inter).
 *
 * Boards: docs/design/ops-v4/boards/SimpleJob.dc.html, CrewCalendar.dc.html
 * ========================================================================== */

.opsv4-job,
.opsv4-crew {
    font-family: Inter, Arial, sans-serif;
    color: #0F1419;
    background: #F4F5F7;
    padding: 20px 28px 32px;
    min-height: 100%;
    box-sizing: border-box;
}

.opsv4-job--loading,
.opsv4-crew--loading,
.opsv4-job--empty,
.opsv4-crew--empty {
    padding: 48px 28px;
    color: #6B7280;
    font-size: 16px;
}

/* ── Job page ────────────────────────────────────────────────────────────── */

.opsv4-job__crumb {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    font-weight: 700;
}
.opsv4-job__crumb a { color: #006B2E; text-decoration: none; }
.opsv4-job__crumb span { margin-left: auto; color: #6B7280; font-weight: 500; }

.opsv4-job__head {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.opsv4-job__title { flex: 1 1 260px; min-width: 0; }
.opsv4-job__title h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.opsv4-job__title p { margin: 2px 0 0; font-size: 16px; color: #4B5563; }
.opsv4-job__ring { flex: 0 0 auto; line-height: 0; }
.opsv4-job__next { flex: 0 0 260px; max-width: 100%; }

.opsv4-job__key { margin-top: 12px; }
.opsv4-job__dates { margin-top: 18px; }

.opsv4-job__tiles {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.opsv4-job-tile {
    /* The border COLOUR is set inline from the kit's status palette. Only its
       width and style live here, so a tile can never invent a fifth meaning. */
    border: 3px solid transparent;
    border-radius: 22px;
    background: #FFFFFF;
    padding: 18px 20px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform .12s;
}
.opsv4-job-tile:hover { transform: translateY(-2px); }
.opsv4-job-tile:focus-visible { outline: 3px solid #009A42; outline-offset: 2px; }

.opsv4-job-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.opsv4-job-tile__label { font-size: 17px; font-weight: 800; color: #374151; }
.opsv4-job-tile__badge {
    font-size: 12px;
    font-weight: 800;
    color: #FFFFFF;
    padding: 4px 11px;
    border-radius: 11px;
}
.opsv4-job-tile__big {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.05;
}
.opsv4-job-tile__sub { font-size: 14px; font-weight: 600; color: #4B5563; }

.opsv4-job__pencil {
    margin-top: 16px;
    font-size: 14px;
    color: #4B5563;
}

/* Sheet rows (rendered inside the kit's sheet, which owns the panel itself) */
.opsv4-job-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    background: #F4F5F7;
    margin-bottom: 8px;
}
.opsv4-job-row__dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.opsv4-job-row__text { flex: 1 1 auto; min-width: 0; }
.opsv4-job-row__title { display: block; font-size: 16px; font-weight: 700; }
.opsv4-job-row__sub { display: block; font-size: 13px; color: #6B7280; }
.opsv4-job-row__cta {
    font-size: 14px;
    font-weight: 800;
    color: #006B2E;
}
.opsv4-job-row__done { font-size: 14px; font-weight: 700; color: #6B7280; }
.opsv4-job-foot { margin-top: 14px; }
.opsv4-job-empty { color: #6B7280; font-size: 15px; }

/* ── Crew calendar ───────────────────────────────────────────────────────── */

.opsv4-crew__crumb {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    font-weight: 700;
}
.opsv4-crew__crumb a { color: #006B2E; text-decoration: none; }
.opsv4-crew__crumb span { margin-left: auto; color: #6B7280; font-weight: 500; }

.opsv4-crew__top {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.opsv4-crew__top h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.opsv4-crew__top p { margin: 2px 0 0; font-size: 16px; color: #4B5563; }
.opsv4-crew__fill { flex: 0 0 300px; max-width: 100%; margin-left: auto; }

.opsv4-crew__askbar {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}
.opsv4-crew__askbar input {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 2px solid #E5E7EB;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 15px;
}
.opsv4-crew__askbar button {
    height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: 14px;
    background: #EEF0F3;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    color: #1F2937;
    cursor: pointer;
}

.opsv4-crew__body {
    margin-top: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.opsv4-crew__grid {
    flex: 1 1 640px;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 22px;
    padding: 12px;
    overflow-x: auto;
}
.opsv4-crew__panel {
    flex: 0 0 380px;
    max-width: 100%;
    background: #FFFFFF;
    border-radius: 22px;
    padding: 20px;
    box-sizing: border-box;
}

.opsv4-crew__lane {
    display: grid;
    grid-template-columns: 170px repeat(var(--opsv4-cols, 5), minmax(120px, 1fr));
    gap: 8px;
    min-height: 100px;
    align-items: stretch;
}
.opsv4-crew__lane--heads { min-height: 0; }

.opsv4-crew__lane-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
}
.opsv4-crew__lane-task { font-size: 14px; font-weight: 800; line-height: 1.25; }
.opsv4-crew__lane-pill {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    color: #374151;
    background: #F4F5F7;
    padding: 3px 8px;
    border-radius: 9px;
}

.opsv4-crew__head {
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    background: #F4F5F7;
}
.opsv4-crew__head-top { font-size: 11px; font-weight: 800; padding: 5px 0; }
.opsv4-crew__head-num { font-size: 22px; font-weight: 800; padding: 3px 0 1px; }
.opsv4-crew__head-band { font-size: 12px; font-weight: 700; padding: 4px 0; color: #374151; }

.opsv4-crew__cell {
    border-radius: 14px;
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #FFFCEE;
}
.opsv4-crew__cell--night { background: #F2F6FC; }
.opsv4-crew__cell--off {
    border-radius: 14px;
    background: repeating-linear-gradient(45deg, #F8F9FA, #F8F9FA 8px, #F1F3F5 8px, #F1F3F5 16px);
}

.opsv4-crew__chip {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 9px;
    border: none;
    border-radius: 11px;
    background: #064A23;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.opsv4-crew__chip--agency { background: #5B21B6; }
/* "Sent" is a mark on the chip, never a colour that could read as a status. */
.opsv4-crew__chip--sent { box-shadow: inset 0 0 0 2px #FFFFFF; }
.opsv4-crew__chip-name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.opsv4-crew__chip-sent { font-size: 13px; font-weight: 800; }
.opsv4-crew__chip-flag {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #FCD34D;
    color: #78350F;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.opsv4-crew__add {
    min-height: 40px;
    border: 2px dashed #F59E0B;
    border-radius: 11px;
    background: #FFFFFF;
    color: #92400E;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.opsv4-crew__hint {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #6B7280;
    padding: 6px 4px 0;
    margin: 0;
}

.opsv4-crew__kicker {
    font-size: 12px;
    font-weight: 800;
    color: #6B7280;
    letter-spacing: 0.5px;
}
.opsv4-crew__panel h2 {
    margin: 6px 0 4px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}
.opsv4-crew__panel p { margin: 0 0 8px; font-size: 15px; color: #4B5563; }
.opsv4-crew__pencil { font-weight: 700; }
.opsv4-crew__nobody {
    font-size: 15px;
    font-weight: 700;
    color: #B45309;
    background: #FFFBEB;
    padding: 10px 12px;
    border-radius: 12px;
}

.opsv4-crew__cands { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.opsv4-crew__cand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 14px;
    background: #F8FAFB;
}
.opsv4-crew__cand--no { opacity: .72; }
.opsv4-crew__cand-text { flex: 1 1 auto; min-width: 0; }
.opsv4-crew__cand-name { display: block; font-size: 16px; font-weight: 700; }
.opsv4-crew__cand-why { display: block; font-size: 13px; color: #6B7280; }
.opsv4-crew__cand-add {
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 13px;
    background: #009A42;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.opsv4-crew__agency { margin-top: 14px; }
.opsv4-crew__agency-note { font-size: 13px; color: #6B7280; margin-top: 8px; }

.opsv4-crew__plan { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.opsv4-crew__plan-row,
.opsv4-crew__plan-left {
    font-size: 14px;
    padding: 8px 11px;
    border-radius: 11px;
    background: #F4F5F7;
}
.opsv4-crew__plan-left { color: #B45309; font-weight: 700; }
.opsv4-crew__loading { color: #6B7280; }

/* Small screens: the panel drops under the grid rather than squeezing it. */
@media (max-width: 1100px) {
    .opsv4-crew__panel { flex: 1 1 100%; }
    .opsv4-job__next { flex: 1 1 100%; }
}
