/* ===========================================================================
   Job Allocation page — matched to the approved Carisma design.
   =========================================================================== */

.ja-page { display: flex; flex-direction: column; gap: 14px; }

/* -------------------------------- banner --------------------------------- */
.ja-banner {
    background: linear-gradient(120deg, #f7ecef 0%, #faf3ee 55%, #fdfbfa 100%);
    border: 1px solid #f1e6e8; border-radius: 18px; padding: 12px 24px;
}
.ja-crumb { display: flex; align-items: center; gap: 8px; font-size: .8rem; margin-bottom: 4px; }
.ja-crumb a { color: #9a7b82; text-decoration: none; }
.ja-crumb a:hover { color: var(--primary-color); text-decoration: underline; }
.ja-crumb strong { color: var(--ink); font-weight: 700; }
.ja-crumb__sep { color: #cdbfc3; }
.ja-title { font-size: 1.5rem; font-weight: 800; color: #1c1416; margin: 0 0 2px; }
.ja-sub { color: #6b5f63; font-size: .88rem; margin: 0; }

/* --------------------------------- steps --------------------------------- */
.ja-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ja-step {
    display: flex; align-items: flex-start; gap: 12px;
    background: #fff; border: 1px solid #eef0f3; border-radius: 14px; padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(20, 20, 40, .04);
}
.ja-step__no {
    flex: none; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f6e9ed; color: var(--primary-color); font-weight: 700; font-size: .9rem;
}
.ja-step__title { font-weight: 700; color: #1c1416; font-size: .98rem; }
.ja-step__text { color: #6b5f63; font-size: .84rem; line-height: 1.3; }

/* --------------------------------- cards --------------------------------- */
.ja-card {
    background: #fff; border: 1px solid #eef0f3; border-top: 3px solid #e9c7d2; border-radius: 16px;
    box-shadow: 0 1px 2px rgba(20, 20, 40, .04);
}
.ja-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid #ece6e2; }
.ja-card__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.2rem; font-weight: 700; color: #1c1416; }
.ja-accent { width: 4px; height: 20px; border-radius: 3px; background: var(--primary-color); }
.ja-count { min-width: 26px; text-align: center; padding: 1px 9px; border-radius: 999px; background: #f6e9ed; color: var(--primary-color); font-size: .82rem; font-weight: 700; }
.ja-req { font-size: .84rem; color: #6b5f63; }
.ja-actions { display: flex; align-items: center; gap: 10px; }

/* ------------------------------ add-job form ------------------------------ */
.ja-form {
    display: grid; grid-template-columns: 2.2fr 1.5fr 1.5fr 1.5fr 1.5fr 1.5fr; gap: 12px 18px;
    padding: 16px 22px 20px; align-items: end;
}
.ja-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ja-field > span { font-size: .86rem; font-weight: 600; color: #1c1416; }
.ja-field > span b { color: #a31f15; font-weight: 700; }
.ja-field > span i { font-style: normal; font-weight: 400; color: #6b5f63; }
.ja-field input, .ja-field select {
    width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px;
    border: 1px solid #d9dde3; border-radius: 10px; background: #fff; color: var(--ink);
    font: inherit; font-size: .94rem; outline: none;
}
.ja-field input::placeholder { color: #a3a7af; }
.ja-field input:focus, .ja-field select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(122, 31, 43, .12); }
.ja-field--comment { grid-column: 1 / span 5; }
.ja-field--add { grid-column: 6; }
.ja-date { height: 44px; }

/* -------------------------------- buttons --------------------------------- */
.ja-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
    height: 44px; padding: 0 20px; border-radius: 10px; font: inherit; font-size: .94rem; font-weight: 600; white-space: nowrap;
}
.ja-btn .material-symbols-rounded { font-size: 20px; }
.ja-btn--primary { border: 1px solid var(--primary-color); background: var(--primary-color); color: #fff; }
.ja-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.ja-btn--ghost { border: 1px solid #d9dde3; background: #fff; color: var(--ink); }
.ja-btn--ghost:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); }
.ja-btn:disabled { opacity: .45; cursor: not-allowed; }
.ja-btn--add, .ja-field--add .ja-btn { width: 100%; }

/* --------------------------------- table ---------------------------------- */
.ja-scroll { overflow-x: auto; }
.ja-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: .92rem; color: #3d3236; }
.ja-table th {
    background: #f6ecef; color: #5a2636; text-align: left; white-space: nowrap;
    font-size: .74rem; font-weight: 700; letter-spacing: .06em; padding: 12px 12px; border-bottom: 1px solid #ece6e2;
}
.ja-table td { padding: 8px 12px; border-bottom: 1px solid #f2eeef; vertical-align: middle; }
.ja-table tbody tr:nth-child(even) td { background: #fcf8f9; }
.ja-table tbody tr:hover td { background: #f9eef2; }
.ja-th--check, .ja-td--check { width: 44px; padding-left: 20px !important; }
.ja-th--num, .ja-td--num { width: 44px; text-align: center; color: #8a8f99; }
.ja-th--r, .ja-td--r { text-align: right; font-variant-numeric: tabular-nums; }
.ja-th--act, .ja-td--act { width: 130px; text-align: right; white-space: nowrap; }
.ja-td--name { font-weight: 700; color: #1c1416; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-td--comment { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #5b6270; }
.ja-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary-color); cursor: pointer; }
.ja-table input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .5; }
.ja-inline-select {
    height: 38px; min-width: 140px; padding: 0 10px; border: 1px solid #d9dde3; border-radius: 8px; background: #fff;
    font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.ja-inline-select:disabled { background: #f6f6f7; cursor: not-allowed; }
.ja-link { border: 0; background: none; padding: 4px 6px; color: var(--primary-color); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.ja-link:hover:not(:disabled) { text-decoration: underline; }
.ja-link:disabled, .ja-icon:disabled { opacity: .4; cursor: not-allowed; }
.ja-icon { border: 0; background: none; padding: 4px; color: #8a8f99; cursor: pointer; vertical-align: middle; }
.ja-icon:hover:not(:disabled) { color: #b42318; }
.ja-icon .material-symbols-rounded { font-size: 20px; }
.ja-empty { padding: 26px; text-align: center; color: #8a8f99; }

/* ------------------------------ status badges ----------------------------- */
.ja-badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; margin-right: 8px; }
.ja-table .ja-badge { margin-right: 0; }
.ja-badge--checklist { background: #fdf0d5; color: #8a5a00; }
.ja-badge--ready { background: #f8e3e8; color: #7a1f2b; }
.ja-badge--stage1 { background: #dfeafb; color: #1f4f9a; }
.ja-badge--allocated { background: #e3f3ea; color: #0d6a40; }

.ja-legend { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; padding: 12px 22px; border-top: 1px solid #ece6e2; font-size: .88rem; color: #5b6270; }

/* -------------------------------- toast ----------------------------------- */
.ja-toast {
    position: fixed; right: 24px; bottom: 24px; z-index: 3500; pointer-events: none;
    background: #1c1416; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem;
    animation: ja-toast 3s ease forwards;
}
.ja-toast--error { background: #b42318; animation-duration: 6s; }
@keyframes ja-toast { 0%, 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(8px); } }

/* ------------------------------ checklist popup --------------------------- */
.ja-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(35, 38, 50, .45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ja-modal { width: min(520px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(20, 20, 40, .3); overflow: hidden; }
.ja-modal__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px; background: #fbf3f5; border-bottom: 1px solid #f1e6e8; }
.ja-modal__kicker { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: #7a6f73; }
.ja-modal__title { margin: 2px 0 0; font-size: 1.1rem; font-weight: 700; color: #1c1416; }
.ja-modal__body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.ja-check { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #eef0f3; border-radius: 10px; cursor: pointer; }
.ja-check:hover { background: #faf3f5; }
.ja-check input { width: 18px; height: 18px; accent-color: var(--primary-color); }
.ja-modal__note { font-size: .86rem; color: #6b5f63; margin-top: 4px; }

/* ------------------------------ small screens ----------------------------- */
@media (max-width: 1100px) {
    .ja-steps { grid-template-columns: 1fr; }
    .ja-form { grid-template-columns: 1fr 1fr; }
    .ja-field--name, .ja-field--comment { grid-column: 1 / -1; }
    .ja-field--add { grid-column: 1 / -1; }
}

/* Delete (trash) button on each row and the confirmation popup. */
.ja-icon--delete { padding: 6px; border: 1px solid #e3d8db; border-radius: 10px; background: #fff; color: #7a1f2b; }
.ja-icon--delete:hover:not(:disabled) { background: #fbeeee; border-color: #b42318; color: #b42318; }
.ja-modal__buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.ja-btn--danger { border: 1px solid #b42318; background: #b42318; color: #fff; }
.ja-btn--danger:hover:not(:disabled) { filter: brightness(1.08); }
