/* One project in the client area (views/project.php and template_parts/projects/*). After portal.css.
   Header with status and progress, a wrapping tab bar, the tab in a card, and calm task and milestone lists. */

/* ---------- Header ---------- */
.ndc-project-head { align-items: flex-start; margin-bottom: 28px; }
.ndc-project-title { flex: 1 1 420px; min-width: 0; }
.ndc-project-head .ndc-eyebrow a { color: var(--purple); text-decoration: none; }
.ndc-project-head .ndc-eyebrow a:hover { text-decoration: underline; }
.ndc-project-head h1 { overflow-wrap: anywhere; }
.ndc-project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; color: var(--slate); }
.ndc-project-meta strong { color: var(--navy); }
.ndc-project-team { display: inline-flex; align-items: center; }
.ndc-project-team > span + span { margin-left: -6px; }
.ndc-project-team img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #FFFFFF; outline: 1px solid var(--line); }
.ndc-project-head .ndc-actions { margin-top: 32px; }
.ndc-project-progress { max-width: 560px; margin-top: 18px; }
.ndc-project-progress-label { display: flex; justify-content: space-between; gap: 12px; color: var(--slate); margin-bottom: 6px; }
.ndc-project-progress-label strong { color: var(--navy); font-variant-numeric: tabular-nums; }

/* Progress bars (Perfex fills the width from data-percent). */
body.customers .ndc-project-head .progress, body.customers .ndc-project-tiles .progress, body.customers .tasks-phases .progress {
  height: 10px; margin: 0; border-radius: 999px; background: #E6E2EC; box-shadow: none; }
body.customers .ndc-project-head .progress-bar, body.customers .ndc-project-tiles .progress-bar, body.customers .tasks-phases .progress-bar {
  background: var(--purple); box-shadow: none; border-radius: 999px; }
body.customers .ndc-project-tiles .progress-bar-warning { background: #D83B91; }

/* ---------- Tabs: one calm row that wraps; Perfex's sideways scroller is not needed. ---------- */
body.customers .ndc-tabs { position: static; margin: 0 0 16px !important; padding: 0 !important; border: 0; background: transparent; }
body.customers .ndc-tabs .scroller { display: none !important; }
body.customers .ndc-tabs .horizontal-tabs { overflow: visible; padding: 0 !important; margin: 0 !important; }
body.customers .ndc-tabs .nav-tabs-horizontal, body.customers .ndc-tabs .nav-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; overflow: visible !important; white-space: normal; border: 0; padding: 0 !important; margin: 0 !important; width: auto !important; background: transparent; }
body.customers .ndc-tabs .nav-tabs > li { float: none; margin: 0 !important; padding: 0; min-width: 0; display: block; }
body.customers .ndc-tabs .nav-tabs > li > a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 !important; padding: 8px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: #FFFFFF; color: var(--navy); font-size: 17px; line-height: 1.3; text-decoration: none; }
body.customers .ndc-tabs .nav-tabs > li > a .menu-icon { color: var(--slate); margin: 0; width: auto; font-size: 15px; }
body.customers .ndc-tabs .nav-tabs > li > a:hover { border-color: var(--navy); background: #FFFFFF; color: var(--navy); }
body.customers .ndc-tabs .nav-tabs > li.active > a, body.customers .ndc-tabs .nav-tabs > li.active > a:hover,
body.customers .ndc-tabs .nav-tabs > li.active > a:focus { background: var(--navy); border-color: var(--navy); color: #FFFFFF; font-weight: 700; }
body.customers .ndc-tabs .nav-tabs > li.active > a .menu-icon { color: #FFFFFF; }
body.customers .ndc-tabs .nav-tabs > li > a::after, body.customers .ndc-tabs .nav-tabs > li.active > a::after { display: none; }

/* ---------- The tab's card ---------- */
.ndc-project-body { padding: clamp(16px, 3vw, 28px); }
.ndc-project-body h2 { font-size: 22px; margin: 0 0 12px; }
.ndc-project-body .table-responsive, .ndc-project-body .dataTables_wrapper { overflow-x: auto; }
.ndc-project-body > .row { margin-left: 0; margin-right: 0; }
.ndc-tab-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.ndc-tab-head h2 { margin: 0; }
.ndc-tab-head .ndc-lead { flex: 1 0 100%; margin: -4px 0 0; color: var(--slate); }
.ndc-tab-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ndc-tab-tools .bootstrap-select { width: 240px !important; max-width: 100%; }

/* ---------- Overview ---------- */
.ndc-project-tiles { margin-bottom: 20px; }
.ndc-project-tiles .ndc-stat { display: flex; flex-direction: column; gap: 6px; }
.ndc-project-tiles .ndc-stat-figure small { font-size: 18px; color: var(--slate); font-weight: 400; }
.ndc-project-tiles .ndc-stat .progress { margin-top: auto; }
.ndc-next-name { display: block; font-family: "Lexend", Arial, sans-serif; font-weight: 600; font-size: 20px; line-height: 1.3; }
.ndc-waiting { border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: 16px; padding: 16px 20px; margin-bottom: 28px; background: #FFFFFF; }
.ndc-waiting h2 { font-size: 20px !important; margin: 0 0 6px !important; }
.ndc-waiting ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.ndc-waiting a { font-weight: 700; }
.ndc-project-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.ndc-project-main { flex: 999 1 420px; min-width: 0; }
.ndc-project-main .project-description { color: var(--navy); }
.ndc-project-facts { flex: 1 1 280px; min-width: 0; background: var(--off); border-radius: 16px; padding: 20px; }
.ndc-facts { margin: 0; display: grid; gap: 10px; }
.ndc-facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ndc-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ndc-facts dt { color: var(--slate); font-weight: 400; }
.ndc-facts dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ndc-project-finance { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.ndc-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 20px; }
.ndc-figures > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.ndc-figures dt { color: var(--slate); font-weight: 400; }
.ndc-figures dd { margin: 4px 0 0; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }

/* ---------- Tasks: milestones as cards that wrap, tasks as rows inside ---------- */
body.customers .tasks-phases { overflow: visible; }
body.customers .tasks-phases .kan-ban-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; min-width: 0 !important; }
body.customers .tasks-phases .kan-ban-col { width: auto; height: auto; margin: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #FFFFFF; }
body.customers .tasks-phases .kan-ban-col.hide { display: none !important; }
body.customers .tasks-phases .kan-ban-col .panel-heading { background: var(--off) !important; border: 0 !important; border-bottom: 1px solid var(--line) !important;
  border-top: 4px solid var(--purple) !important; color: var(--navy) !important; padding: 14px 16px; border-radius: 0; }
body.customers .tasks-phases .kan-ban-col .panel-heading.info-bg { border-top-color: var(--slate) !important; }
body.customers .tasks-phases .kan-ban-col .panel-heading .bold { display: block; font-family: "Lexend", Arial, sans-serif; font-weight: 600; font-size: 19px !important; }
body.customers .tasks-phases .kan-ban-col .panel-heading .tw-text-xs, body.customers .tasks-phases .kan-ban-col .panel-heading small { font-size: 16px; color: var(--slate); }
body.customers .tasks-phases .panel-body { background: #FFFFFF; padding: 8px 16px; height: auto; min-height: 0 !important; overflow: visible; flex: 1 1 auto; }
body.customers .tasks-phases ._task_wrapper { border: 0; border-bottom: 1px solid #EEF1F0; border-radius: 0; padding: 12px 0; margin: 0; }
body.customers .tasks-phases ._task_wrapper:last-child { border-bottom: 0; }
body.customers .tasks-phases ._task_wrapper .task_milestone { float: none !important; max-width: none; white-space: normal; font-weight: 700; font-size: 18px; }
body.customers .tasks-phases ._task_wrapper .tw-text-xs, body.customers .tasks-phases ._task_wrapper .text-xs { font-size: 16px; }
body.customers .tasks-phases .overdue-task { box-shadow: inset 4px 0 0 #D83B91; padding-left: 12px; }
body.customers .tasks-phases .panel-footer { background: #FFFFFF; border-top: 1px solid var(--line); padding: 12px 16px; }
.ndc-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; color: var(--slate); font-size: 16px; }
.ndc-task-meta b { color: var(--navy); }
.ndc-ms-done { margin: 0 0 6px; font-size: 16px; color: var(--slate); }
.ndc-task-edit { font-size: 16px; white-space: nowrap; }
body.customers .tasks-phases .kan-ban-col .panel-heading .tw-text-xs { display: block; }
.ndc-ms-info { margin-top: 6px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: #FFFFFF; color: var(--blue); font-size: 16px; }
.ndc-ms-info:hover { border-color: var(--navy); }
.task-table-toggle span.tasks-phases { overflow: visible !important; }

/* ---------- One task ---------- */
.ndc-task-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 16px; }
.ndc-task-head h2 { margin: 0; font-size: clamp(24px, 2.6vw, 30px); overflow-wrap: anywhere; }
.ndc-task-back { display: inline-block; margin-bottom: 12px; }
#task .task-info { float: none !important; padding: 0 0 10px; font-size: 18px; }
#task .task-info h5 { font-size: 18px; margin: 0; font-weight: 400; color: var(--navy); }
.ndc-task-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.ndc-task-section h3 { font-size: 20px; margin: 0 0 12px; }
#task .task-checklist-indicator { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid currentColor; font-size: 12px; }
#task .task-comment { display: flex; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 0; margin: 0; }
#task .task-comment > hr { display: none; }
#task .task-comment .media-body { flex: 1 1 auto; min-width: 0; }
#task .task-comment img { width: 40px; height: 40px; }
#task .task-comment .comment-content { margin-top: 6px; }
#task form .btn-primary.pull-right { float: none !important; margin-top: 12px; }
#task .dropzone { border: 2px dashed #9AA4B5; border-radius: 16px; background: var(--off); min-height: 120px; }

/* ---------- Task forms (new and edit) ---------- */
.ndc-task-form { max-width: 820px; }
.ndc-task-form .ndc-form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.ndc-task-form .btn.pull-right { float: none !important; }

/* ---------- Files and discussions ---------- */
.ndc-group-project_files .dropzone { border: 2px dashed #9AA4B5; border-radius: 16px; background: var(--off); min-height: 140px; margin-bottom: 16px; }
.ndc-group-project_files .dropzone .dz-message { font-size: 18px; color: var(--navy); }
.ndc-file-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.ndc-file-tools .gpicker { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; padding: 0 14px; }
.ndc-group-project_files .project-file-image { border-radius: 8px; display: block; margin-bottom: 6px; }
.ndc-discussion-meta { color: var(--slate); margin: 0 0 16px; }
.ndc-discussion-body { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 20px; }
._project_file .modal-title { font-size: 22px; }

/* ---------- Gantt ---------- */
.ndc-group-project_gantt .ndc-gantt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.ndc-gantt-view { display: flex; align-items: center; gap: 10px; }
.ndc-gantt-view label { margin: 0; font-weight: 400; color: var(--slate); }
.ndc-gantt-view .bootstrap-select { width: 180px !important; }

/* ---------- Activity: a simple timeline ---------- */
.ndc-group-project_activity .activity-feed { padding: 0; border: 0; }
.ndc-group-project_activity .feed-item { position: relative; display: flex; gap: 14px; padding: 0 0 20px 0; border: 0; margin: 0; }
.ndc-group-project_activity .feed-item::before, .ndc-group-project_activity .feed-item::after { display: none; }
.ndc-group-project_activity .feed-item img { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; margin: 0 !important; float: none !important; }
.ndc-group-project_activity .feed-item .media-body { flex: 1 1 auto; min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.ndc-group-project_activity .feed-item .date { font-size: 16px; color: var(--slate); margin: 0 0 2px; position: static; }
.ndc-group-project_activity .feed-item p { margin: 0; }
.ndc-group-project_activity .feed-item .text-muted:empty { display: none; }

/* ---------- Bits of the task, discussion and activity views ---------- */
.ndc-task-facts { margin-bottom: 8px; max-width: 640px; }
.ndc-task-facts .ndc-late dd { color: #B0246F; }
.ndc-assignees { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.ndc-assignees .task-user { display: inline-flex; align-items: center; gap: 8px; float: none; margin: 0; }
.ndc-assignees .task-user img { width: 32px; height: 32px; border-radius: 50%; }
.ndc-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ndc-checklist li { display: flex; align-items: center; gap: 10px; }
.ndc-checklist li.is-done { color: var(--slate); }
.ndc-comment-form { margin-bottom: 8px; }
.ndc-comment-form .btn { margin-top: 12px; }
.ndc-comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ndc-comment-head small { font-size: 16px; }
.ndc-comment-tools { margin-left: auto; display: inline-flex; gap: 14px; font-size: 16px; }
[data-edit-comment] .btn { margin-right: 8px; }
.ndc-comments-title { font-size: 20px; margin: 0 0 12px; }
ol.ndc-activity { list-style: none; margin: 0; padding: 0; }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  .ndc-project-head .ndc-actions { margin-top: 0; width: 100%; }
  .ndc-project-head .ndc-actions .btn { width: 100%; }
  body.customers .ndc-tabs .nav-tabs > li > a { padding: 6px 14px; font-size: 16px; min-height: 40px; }
  body.customers .tasks-phases .kan-ban-row { grid-template-columns: 1fr; }
  .ndc-facts dd { text-align: left; }
}
