/* Project details uses a dedicated stylesheet so AJAX tab responses never have
   to supply their own layout rules. All selectors are scoped to this page. */
.project-details-view {
    --pd-primary: #3864d7;
    --pd-primary-soft: #eef3ff;
    --pd-border: #e1e7f0;
    --pd-ink: #14233e;
    --pd-muted: #6d7d96;
    padding: 20px 22px 32px !important;
    background: #f7f9fc !important;
}

.project-details-view > .container-fluid { padding: 0 !important; }
.project-details-view .project-title-section { margin-bottom: 18px !important; }

.project-details-view .project-title-section > .page-title {
    min-height: 112px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 22px;
    margin: 0 0 14px !important;
    padding: 20px 22px !important;
    border: 1px solid #e1e7f0 !important;
    border-radius: 10px !important;
    background: linear-gradient(120deg, #fff 0%, #fff 72%, #f0f5ff 100%) !important;
    box-shadow: 0 5px 18px rgba(25, 48, 86, .045) !important;
}

.project-details-view .project-title-section > .page-title::before,
.project-details-view .project-title-section > .page-title::after {
    display: none !important;
    content: none !important;
}

.project-details-view .project-title-copy {
    min-width: 0;
    display: block;
    flex: 1 1 auto;
}

.project-details-view .project-title-kicker {
    display: block;
    margin-bottom: 7px;
    color: #3864d7;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.3;
    text-transform: uppercase;
}

.project-details-view .project-title-section h1 {
    min-width: 0;
    display: flex !important;
    align-items: center !important;
    gap: 9px;
    margin: 0 !important;
    padding: 0 !important;
    color: #14233e;
    font-size: 24px !important;
    font-weight: 700;
    line-height: 1.2;
}

.project-details-view .project-title-status-icon {
    width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    color: #3864d7;
    border-radius: 9px;
    background: #eef3ff;
}

.project-details-view .project-title-status-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.project-details-view #star-mark {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

.project-details-view .project-title-meta {
    min-height: 18px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    padding-left: 45px;
    color: #6d7d96;
    font-size: 11px;
}

.project-details-view .project-title-meta-dot {
    width: 4px;
    height: 4px;
    display: inline-block;
    border-radius: 50%;
    background: #a8b4c6;
}

.project-details-view .project-title-button-group-section {
    max-width: 55%;
    flex: 0 1 auto;
}

.project-details-view #project-timer-box {
    width: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    float: none !important;
    margin: 0 !important;
}

.project-details-view #project-timer-box .btn {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

.project-details-view #project-tabs {
    min-height: 58px;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 3px;
    margin: 0 !important;
    padding: 0 12px !important;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #e1e7f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(25, 48, 86, .035);
    scrollbar-width: none;
}

.project-details-view #project-tabs::-webkit-scrollbar { display: none; }
.project-details-view #project-tabs .nav-item { flex: 0 0 auto; }

.project-details-view #project-tabs .nav-link {
    position: relative;
    min-height: 57px;
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 15px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #5f7089;
    font-size: 11px !important;
    font-weight: 600;
    white-space: nowrap;
}

.project-details-view #project-tabs .project-tab-icon {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px;
}

.project-details-view #project-tabs .nav-link::after {
    position: absolute;
    right: 10px;
    bottom: -1px;
    left: 10px;
    height: 2px;
    content: "";
    border-radius: 2px 2px 0 0;
    background: transparent;
}

.project-details-view #project-tabs .nav-link:hover,
.project-details-view #project-tabs .nav-link.active { color: #3864d7 !important; }
.project-details-view #project-tabs .nav-link.active::after { background: #3864d7; }

.project-details-view .project-detail-content,
.project-details-view .project-detail-content > .tab-pane {
    min-width: 0;
    max-width: 100%;
}

.project-details-view .project-detail-content > .tab-pane > .card {
    margin: 0;
    overflow: hidden;
    border: 1px solid #e1e7f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(25, 48, 86, .045);
}

/* Shared header used by task list, Additional Task, and Kanban AJAX tabs. */
.project-details-view .pt-inner-section-card > .pt-inner-section-header {
    width: 100% !important;
    min-height: 72px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px;
    padding: 14px 20px !important;
    border-bottom: 1px solid #e1e7f0 !important;
    background: #fff !important;
}

.project-details-view .pt-comment-heading {
    min-width: 0;
    display: flex;
    align-items: center;
}

.project-details-view .pt-comment-heading h5 {
    margin: 0 !important;
    color: #15213b;
    font-size: 16px !important;
    font-weight: 700;
    line-height: 1.25;
}

.project-details-view .pt-comment-heading small {
    display: block;
    margin-top: 5px;
    color: #8792a5;
    font-size: 11px;
    line-height: 1.3;
}

.project-details-view .pt-inner-section-header .pt-inner-section-actions {
    width: auto !important;
    min-width: max-content;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px;
    float: none !important;
    margin: 0 !important;
}

.project-details-view .project-inner-section-actions .project-comment-add-button.btn,
.project-details-view .pt-inner-section-actions .pt-comment-add-button.btn {
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto;
    gap: 6px;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 1px solid #c8d5f5 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #3864d7 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.project-details-view .project-inner-section-actions .project-comment-add-button.btn:hover,
.project-details-view .project-inner-section-actions .project-comment-add-button.btn:focus,
.project-details-view .pt-inner-section-actions .pt-comment-add-button.btn:hover,
.project-details-view .pt-inner-section-actions .pt-comment-add-button.btn:focus {
    border-color: #3864d7 !important;
    background: #eef3ff !important;
    color: #3864d7 !important;
}

@media (max-width: 767px) {
    .project-details-view { padding: 12px 12px 82px !important; }

    .project-details-view .project-title-section > .page-title {
        align-items: flex-start !important;
        flex-direction: column;
        padding: 17px !important;
    }

    .project-details-view .project-title-button-group-section,
    .project-details-view #project-timer-box { width: 100% !important; max-width: 100%; }
    .project-details-view #project-timer-box { justify-content: flex-start; }
    .project-details-view .project-title-meta { padding-left: 0; }
    .project-details-view .pt-comment-heading small { display: none; }
    .project-details-view .pt-inner-section-actions { min-width: auto !important; }
    .project-details-view .pt-comment-add-button span { display: none; }
    .project-details-view .pt-inner-section-actions .pt-comment-add-button.btn { width: 36px; padding: 0 !important; }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .project-details-view .project-title-section > .page-title {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .project-details-view .project-title-button-group-section {
        width: 100%;
        max-width: 100%;
    }

    .project-details-view #project-timer-box { justify-content: flex-start; }
}
