/* Sector 7 — Project Management CSS */

/* ── Project cards on index ───────────────────────────────────────────── */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.pm-project-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.15s;
}
.pm-project-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.pm-project-color-bar {
    height: 5px;
    width: 100%;
}
.pm-project-card-body {
    padding: 16px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pm-project-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0d1a2e;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-project-card-desc {
    font-size: 0.82rem;
    color: #6b7b8d;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pm-project-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #9aabbd;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 4px;
}
.pm-progress-bar {
    width: 100%;
    height: 6px;
    background: #e8edf5;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.pm-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s;
}

/* ── Stats tiles ──────────────────────────────────────────────────────── */
.pm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.pm-stat-tile {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pm-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #6b7b8d;
}
.pm-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0d1a2e;
    line-height: 1;
}
.pm-stat-value.red   { color: #b91c1c; }
.pm-stat-value.green { color: #15803d; }
.pm-stat-value.orange{ color: #c2410c; }

/* ── Project header banner ────────────────────────────────────────────── */
.pm-project-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pm-project-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}
.pm-project-header-info {
    flex: 1;
    min-width: 0;
}
.pm-project-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d1a2e;
    margin: 0 0 4px;
}
.pm-project-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #6b7b8d;
    flex-wrap: wrap;
}
.pm-project-header-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

/* ── Kanban Board ─────────────────────────────────────────────────────── */
.pm-kanban {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 16px;
    align-items: flex-start;
}
.pm-kanban-col {
    flex: 0 0 260px;
    background: #f4f7fb;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
}
.pm-kanban-col-header {
    padding: 12px 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dce4ee;
    flex-shrink: 0;
}
.pm-kanban-col-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pm-kanban-col-count {
    background: #e8edf5;
    color: #4a5568;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}
.pm-kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 4px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pm-kanban-cards.drag-over {
    background: rgba(30,144,255,0.06);
    border-radius: 6px;
}
.pm-kanban-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    padding: 11px 13px;
    cursor: pointer;
    transition: box-shadow 0.12s;
    position: relative;
}
.pm-kanban-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.09);
}
.pm-kanban-card.dragging {
    opacity: 0.5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.pm-kanban-card-priority-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 8px 0 0 8px;
}
.pm-kanban-card-title {
    font-size: 0.87rem;
    font-weight: 600;
    color: #0d1a2e;
    margin-bottom: 6px;
    padding-left: 6px;
    line-height: 1.4;
}
.pm-kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 6px;
    flex-wrap: wrap;
    gap: 4px;
}
.pm-kanban-card-assignee {
    font-size: 11px;
    color: #6b7b8d;
}
.pm-kanban-card-due {
    font-size: 11px;
    color: #6b7b8d;
}
.pm-kanban-card-due.overdue { color: #b91c1c; font-weight: 700; }
.pm-kanban-card-due.due-soon { color: #c2410c; font-weight: 600; }
.pm-kanban-card-progress {
    margin-top: 6px;
    padding-left: 6px;
}
.pm-kanban-add-btn {
    display: block;
    text-align: center;
    padding: 8px;
    color: #9aabbd;
    font-size: 13px;
    text-decoration: none;
    border-top: 1px solid #dce4ee;
    transition: color 0.12s, background 0.12s;
    flex-shrink: 0;
    border-radius: 0 0 10px 10px;
}
.pm-kanban-add-btn:hover {
    background: #e8edf5;
    color: #1e90ff;
}

/* ── Task list view ───────────────────────────────────────────────────── */
.pm-task-list .pm-task-row {
    display: grid;
    grid-template-columns: 28px 1fr 100px 120px 90px 90px 80px;
    gap: 8px;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.875rem;
    transition: background 0.1s;
}
.pm-task-list .pm-task-row:hover { background: #f8fafc; }
.pm-task-list .pm-task-header-row {
    background: #f4f7fb;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7b8d;
    border-bottom: 2px solid #dce4ee;
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
}
.pm-task-row a { color: #1e90ff; text-decoration: none; }
.pm-task-row a:hover { text-decoration: underline; }
@media (max-width: 900px) {
    .pm-task-list .pm-task-row { grid-template-columns: 28px 1fr 90px 90px 80px; }
    .pm-task-list .pm-task-row .col-assignee,
    .pm-task-list .pm-task-header-row .col-assignee { display: none; }
}
@media (max-width: 600px) {
    .pm-task-list .pm-task-row { grid-template-columns: 1fr 80px 70px; }
    .pm-task-list .pm-task-row .col-check,
    .pm-task-list .pm-task-row .col-milestone,
    .pm-task-list .pm-task-row .col-priority { display: none; }
}

/* ── Gantt wrapper ────────────────────────────────────────────────────── */
.pm-gantt-wrapper {
    overflow-x: auto;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    background: #fff;
}
.pm-gantt-wrapper table { width: 100%; border-collapse: collapse; }
.gantt-row:hover td { background: #f0f4fa !important; cursor: pointer; }

/* ── Milestone cards ──────────────────────────────────────────────────── */
.pm-milestone-list { display: flex; flex-direction: column; gap: 12px; }
.pm-milestone-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    padding: 16px 18px;
}
.pm-milestone-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.pm-milestone-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0d1a2e;
}
.pm-milestone-tasks {
    font-size: 0.82rem;
    color: #6b7b8d;
    margin-top: 6px;
}

/* ── File list ────────────────────────────────────────────────────────── */
.pm-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.pm-file-card {
    background: #f8fafc;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pm-file-icon { font-size: 1.8rem; line-height: 1; }
.pm-file-name { font-size: 0.85rem; font-weight: 600; color: #0d1a2e; word-break: break-word; }
.pm-file-meta { font-size: 0.78rem; color: #9aabbd; }
.pm-file-actions { display: flex; gap: 6px; margin-top: 4px; }

/* ── Report / charts ──────────────────────────────────────────────────── */
.pm-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.pm-report-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    padding: 18px;
}
.pm-report-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7b8d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 14px;
}
.pm-chart-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.82rem;
}
.pm-chart-bar-label { width: 90px; color: #4a5568; flex-shrink: 0; text-align: right; }
.pm-chart-bar-track {
    flex: 1;
    height: 14px;
    background: #e8edf5;
    border-radius: 7px;
    overflow: hidden;
}
.pm-chart-bar-fill {
    height: 100%;
    border-radius: 7px;
    min-width: 2px;
    transition: width 0.4s;
}
.pm-chart-bar-val { width: 32px; color: #4a5568; font-weight: 600; text-align: right; }
.pm-health-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}
.pm-health-green  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.pm-health-yellow { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.pm-health-red    { background: #fff1f2; color: #b91c1c; border: 1px solid #fecdd3; }

/* ── Task detail view ─────────────────────────────────────────────────── */
.pm-task-detail {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
}
@media (max-width: 800px) {
    .pm-task-detail { grid-template-columns: 1fr; }
}
.pm-task-sidebar-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}
.pm-task-sidebar-card h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #6b7b8d;
    margin: 0 0 10px;
}
.pm-sidebar-kv { display: flex; flex-direction: column; gap: 8px; }
.pm-sidebar-kv-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.pm-sidebar-kv-label { color: #6b7b8d; }
.pm-sidebar-kv-val { font-weight: 600; color: #0d1a2e; }

/* ── Time log ─────────────────────────────────────────────────────────── */
.pm-time-log-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.86rem;
}
.pm-time-log-entry:last-child { border-bottom: none; }
.pm-time-hours {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}
.pm-time-info { flex: 1; }
.pm-time-meta { font-size: 11px; color: #9aabbd; margin-top: 2px; }

/* ── Comment thread ───────────────────────────────────────────────────── */
.pm-comment {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.pm-comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1e90ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.pm-comment-bubble {
    flex: 1;
    background: #f4f7fb;
    border: 1px solid #dce4ee;
    border-radius: 0 8px 8px 8px;
    padding: 10px 14px;
}
.pm-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: #6b7b8d;
}
.pm-comment-author { font-weight: 700; color: #0d1a2e; }
.pm-comment-body { font-size: 0.87rem; color: #1e2a3a; white-space: pre-wrap; line-height: 1.6; }

/* ── Notifications bell ───────────────────────────────────────────────── */
.pm-notif-bell-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.pm-notif-bell {
    background: none;
    border: none;
    cursor: pointer;
    color: #b0bec5;
    font-size: 18px;
    padding: 4px 6px;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
    position: relative;
    line-height: 1;
}
.pm-notif-bell:hover { color: #1e90ff; background: rgba(30,144,255,0.08); }
.pm-notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e53e3e;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    min-width: 16px;
    text-align: center;
    line-height: 16px;
    height: 16px;
    display: none;
}
.pm-notif-count.visible { display: block; }
.pm-notif-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    z-index: 9999;
    display: none;
    overflow: hidden;
}
.pm-notif-dropdown.open { display: block; }
.pm-notif-dropdown-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #0d1a2e;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pm-notif-mark-all {
    font-size: 11px;
    color: #1e90ff;
    cursor: pointer;
    font-weight: 600;
}
.pm-notif-list { max-height: 320px; overflow-y: auto; }
.pm-notif-item {
    padding: 11px 16px;
    border-bottom: 1px solid #f4f7fb;
    font-size: 0.82rem;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}
.pm-notif-item:hover { background: #f8fafc; }
.pm-notif-item.unread { background: #eff6ff; }
.pm-notif-item-title { font-weight: 600; color: #0d1a2e; margin-bottom: 2px; }
.pm-notif-item-body  { color: #6b7b8d; font-size: 11px; }
.pm-notif-item-time  { color: #9aabbd; font-size: 10px; margin-top: 3px; }
.pm-notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: #9aabbd;
    font-size: 13px;
}
.pm-notif-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid #edf2f7;
}
.pm-notif-footer a { font-size: 12px; color: #1e90ff; text-decoration: none; }

/* ── Calendar wrapper ─────────────────────────────────────────────────── */
.pm-calendar-wrap {
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    padding: 16px;
}
/* FullCalendar overrides */
.fc .fc-button { background: #f0f4fa !important; border: 1px solid #dce4ee !important; color: #333 !important; font-size: 13px !important; font-weight: 600 !important; }
.fc .fc-button-active { background: #1e90ff !important; color: #fff !important; border-color: #1e90ff !important; }
.fc .fc-button:focus { box-shadow: none !important; }
.fc .fc-toolbar-title { font-size: 1.1rem; font-weight: 700; color: #0d1a2e; }
.fc .fc-daygrid-day-number { color: #4a5568; font-size: 13px; }
.fc .fc-event { border-radius: 4px; font-size: 11px; }
.fc .fc-col-header-cell { font-size: 12px; font-weight: 700; color: #6b7b8d; }

/* ── Member avatars ───────────────────────────────────────────────────── */
.pm-member-list { display: flex; flex-direction: column; gap: 10px; }
.pm-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.87rem;
}
.pm-member-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #1e90ff;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.pm-member-name { font-weight: 600; color: #0d1a2e; }
.pm-member-role { font-size: 11px; color: #9aabbd; }

/* ── Drag placeholder ─────────────────────────────────────────────────── */
.sortable-ghost {
    opacity: 0.4;
    background: #dbeafe !important;
    border: 2px dashed #1e90ff !important;
}
.sortable-chosen { box-shadow: 0 4px 16px rgba(30,144,255,0.2); }

/* ── Responsive tweaks ────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .pm-kanban { flex-direction: column; }
    .pm-kanban-col { flex: none; width: 100%; max-height: none; }
    .pm-project-header { flex-direction: column; }
    .pm-task-detail { grid-template-columns: 1fr; }
}
