/*
  Copyright (c) 2026 Blue Astra Technologies LLP, India. All Rights Reserved.
  Proprietary software. Unauthorized copying or use by any means or technology
  (including AI tools) is strictly prohibited.
*/
/* =====================================================
   PROPOSAL TASK ASSIGNMENT  (Proposals › Task Assignment)
   Board, cards, and the assign/edit picker.
   ===================================================== */

/* ---- Header note while the paywall is lifted ---- */
.pta-flag {
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: #fff4e5;
    color: #b45309;
    border: 1px solid #fcd9a4;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
}

/* ---- Stat strip ---- */
.pta-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}
.pta-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 10px;
    padding: 10px 12px;
}
.pta-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex: 0 0 auto;
}
.pta-stat strong { display: block; font-size: 1.25rem; line-height: 1.1; color: #16233a; }
.pta-stat span { font-size: 0.74rem; color: #8a93a3; }

/* ---- Board controls ---- */
.pta-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}
.pta-controls select,
.pta-controls input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}
.pta-controls input { flex: 1; min-width: 170px; }

/* ---- Assignment card ---- */
.pta-card {
    border: 1px solid #eef1f6;
    border-left: 4px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
}
.pta-card.pta-assigned { border-left-color: #2d6cdf; }
.pta-card.pta-in-progress { border-left-color: #7C4DFF; }
.pta-card.pta-review { border-left-color: #f59e0b; }
.pta-card.pta-completed { border-left-color: #12b3a6; }
.pta-card.pta-on-hold { border-left-color: #94a3b8; }
.pta-card.pta-overdue { background: #fff8f7; }

.pta-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.pta-title { font-weight: 600; color: #16233a; }

.pta-badge {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    white-space: nowrap;
}
.pta-badge-cluster { background: #ede7ff; color: #6d3fe0; }
.pta-badge-low { background: #eef2f7; color: #64748b; }
.pta-badge-medium { background: #e6f0ff; color: #2d6cdf; }
.pta-badge-high { background: #fff1e0; color: #c2600a; }
.pta-badge-urgent { background: #ffe6e6; color: #c62828; }
.pta-badge-overdue { background: #c62828; color: #fff; }

.pta-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}
.pta-status-assigned { background: #e6f0ff; color: #2d6cdf; }
.pta-status-in-progress { background: #ede7ff; color: #6d3fe0; }
.pta-status-review { background: #fff1e0; color: #c2600a; }
.pta-status-completed { background: #e2f7f4; color: #0d8a80; }
.pta-status-on-hold { background: #eef2f7; color: #64748b; }

.pta-who { font-size: 0.8rem; color: #475569; margin: 6px 0; }
.pta-dim { color: #94a3b8; font-weight: 400; }

.pta-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.pta-chip {
    font-size: 0.74rem;
    background: #f5f7fb;
    border: 1px solid #e6ebf3;
    border-radius: 8px;
    padding: 3px 9px;
    color: #334155;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pta-chip b { color: #2d6cdf; }
.pta-chip-more { background: #ede7ff; border-color: #ded4ff; color: #6d3fe0; }

.pta-notes {
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 0.82rem;
    color: #475569;
    margin: 8px 0 0;
    white-space: pre-wrap;
}

.pta-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.pta-status-select {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff;
}

/* ---- Grouped-by-employee view ---- */
.pta-group {
    border: 1px solid #eef1f6;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
    background: #fbfcfe;
}
.pta-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pta-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2E86FF, #5aa2ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: 0 0 auto;
}
.pta-group-head strong { display: block; color: #16233a; }
.pta-group-meta { font-size: 0.75rem; color: #8a93a3; }

/* ---- Assign / edit modal ---- */
.pta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pta-row .form-group { flex: 1; min-width: 150px; }
.pta-meta { font-size: 0.76rem; color: #8a93a3; margin-top: 4px; min-height: 14px; }

/* Employee ID box — the assignee is typed in, so the field says whether the
   ID resolved to somebody on the roster. */
.pta-idfield { position: relative; }
.pta-idfield input { width: 100%; padding-right: 34px; text-transform: none; }
.pta-idstate {
    position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
    font-size: 0.95rem; pointer-events: none;
}
.pta-idstate-searching { color: #8a93a3; }
.pta-idstate-ok { color: #1f9d61; }
.pta-idstate-none { color: #d9534f; }
.pta-idstate-detached { color: #d9822b; }
.pta-idfield input.pta-id-ok { border-color: #1f9d61; }
.pta-idfield input.pta-id-bad { border-color: #d9534f; }

.pta-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: #8a93a3;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 2px 9px;
    margin-left: 6px;
}
.pta-count-cluster { background: #ede7ff; color: #6d3fe0; }

.pta-pick-controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.pta-pick-controls input {
    flex: 1;
    min-width: 150px;
    padding: 7px 9px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.83rem;
}

.pta-picker {
    max-height: 260px;
    overflow: auto;
    border: 1px solid #e6ebf3;
    border-radius: 8px;
    padding: 6px;
    background: #fbfcfe;
}
.pta-pick {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.84rem;
    color: #334155;
}
.pta-pick:hover { background: #eef4ff; }
.pta-pick-on { background: #e6f0ff; }
.pta-pick input { margin: 0; flex: 0 0 auto; }
.pta-pick-type {
    font-size: 0.68rem;
    font-weight: 700;
    color: #2d6cdf;
    background: #e6f0ff;
    border-radius: 6px;
    padding: 2px 7px;
    flex: 0 0 auto;
}
.pta-pick-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pta-held {
    font-size: 0.7rem;
    color: #c2600a;
    background: #fff1e0;
    border-radius: 8px;
    padding: 2px 8px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.pta-hint { font-size: 0.76rem; color: #8a93a3; margin: 6px 0 0; }
.pta-check { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #475569; }

.pta-list { list-style: none; padding: 0; margin: 0; }
.pta-list li {
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pta-list li:last-child { border-bottom: none; }
.pta-timeline { max-height: 220px; overflow: auto; }

@media (max-width: 640px) {
    .pta-card-head { flex-direction: column; }
    .pta-chip { max-width: 100%; }
}
