.project-update-wrapper {
    max-width: 900px;
    margin: 0 auto;
    /*background: #ffffff;*/
    border-radius: 8px;
    /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);*/
    /*font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;*/
}

.project-update-header {
    /*background: #f9fafb;*/
    padding: 1.5rem;
    /*border-bottom: 1px solid #e5e7eb;*/
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: flex-end;
    margin-top:-80px;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-update-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.project-update-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.current-activity-link {
    color: #14b8a6;
    text-decoration: none;
    font-weight: 500;
}

.current-activity-link:hover {
    color: #0d9488;
}

.project-update-content {
    padding-top: 1.5rem;
}

.phase-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.phase-item:last-child {
    margin-bottom: 0;
}

.phase-header {
    /*background: #b2dfdb;*/
        border-bottom: 1px solid #dadee3;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.phase-header:hover {
    background: rgba(174, 228, 234, 1);
}

.phase-header.active {
    background: rgba(174, 228, 234, 1);
}

.phase-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phase-chevron {
    display: inline-flex;
    color: #0E7581;
}

.phase-header.active .phase-chevron {
    color: #0E7581;
}

.chevron-icon {
    display: none;
}

.phase-header .chevron-right {
    display: inline-block;
}

.phase-header.active .chevron-right {
    display: none;
}

.phase-header.active .chevron-down {
    display: inline-block;
}

.phase-label {
    font-weight: 600;
    color: #2B2E31;
    font-size: 0.9rem;
}

.phase-header.active .phase-label {
    color: #0E7581;
}

.phase-count {
    min-width: 32px;
    height: 32px;
    background: #14b8a6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 0.5rem;
}

.phase-body {
    display: none;
    background: #ffffff;
    padding: 1rem;
}

.phase-body.expanded {
    display: block;
}

.phase-description {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.875rem;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    transition: opacity 0.3s, max-height 0.3s;
}

.activity-item.activity-hidden {
    display: none;
}

.activity-card {
    /*background: #f9fafb;*/
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.activity-card.activity-in-progress {
    background: rgba(93, 193, 166, 0.1);
    border: 1px solid #5DC1A6;
    /*box-shadow: 0 0 0 2px rgba(93, 193, 166, 0.15);*/
}

.activity-header-row {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 1rem;
}

.activity-header-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.activity-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.activity-chevron {
    display: inline-flex;
    color: #6b7280;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.activity-card.expanded .activity-chevron {
    transform: rotate(90deg);
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-card.activity-in-progress .activity-title {
    color: #2B2E31;
    font-weight: 500;
}

img.comment-avatar {
    height: 40px!important;
    width: 40px!important;
    border-radius: 25px!important;
}

.activity-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
        min-width: 156px;
}

.time-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.activity-clock-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-clock-icon.clock-icon-remaining {
    color: #0369a1;
    stroke: #0369a1;
}

.activity-clock-icon.clock-icon-overdue {
    color: #dc2626;
    stroke: #dc2626;
}

.activity-clock-icon.clock-icon-duration {
    color: #6b7280;
    stroke: #6b7280;
}

.activity-clock-icon:hover {
    transform: scale(1.1);
}

.time-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

.time-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ffffff;
}

.time-icon-wrapper:hover .time-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

.tooltip-content {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.tooltip-date {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
}

.clock-icon-remaining + .time-tooltip {
    background: #AEE4EA;
}

.clock-icon-remaining + .time-tooltip::after {
    border-top-color: #AEE4EA;
}

.clock-icon-remaining + .time-tooltip .tooltip-content {
    color: #0E7581;
}

.clock-icon-overdue + .time-tooltip {
    background: #fee2e2;
}

.clock-icon-overdue + .time-tooltip::after {
    border-top-color: #fee2e2;
}

.clock-icon-overdue + .time-tooltip .tooltip-content {
    color: #dc2626;
}

.clock-icon-duration + .time-tooltip {
    background: #f3f4f6;
}

.clock-icon-duration + .time-tooltip::after {
    border-top-color: #f3f4f6;
}

.clock-icon-duration + .time-tooltip .tooltip-content {
    color: #374151;
}

span.time-badge.time-duration {
    background: #adb8cc4f;
    padding: 3px 15px;
    font-size: 14px;
    border-radius: 27px;
}

span.meta-value.progress {
    background: #FF9B00;
    border-radius: 25px;
    padding: 2px 10px;
}
.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    background: #14b8a6;
}

.status-badge.status-completed {
    background: #14b8a6;
}

.status-badge.status-progress {
    background: #AEE4EA;
    color: #111111;
}

.toggle-comments-btn {
    background: transparent;
    border: none;
    padding: 0.375rem;
    cursor: pointer;
    border-radius: 9999px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.toggle-comments-btn:hover {
    background: rgba(20, 184, 166, 0.1);
}

.message-icon {
    color: #14b8a6;
}

.comment-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

.activity-details {
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    background: #ffffff;
}

.activity-card.activity-in-progress .activity-details {
    /*background: rgba(93, 193, 166, 0.05);*/
}

.activity-description {
    color: #4b5563;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.6;
    font-size: 0.875rem;
}

.activity-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.meta-item .icon {
    color: #6b7280;
}

.meta-label {
    color: #6b7280;
}

.meta-value {
    font-weight: 500;
    color: #1f2937;
}

.comments-section {
    margin-top: 0;
}

.comments-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
}

.comments-loading {
    color: #6b7280;
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-item {
    display: flex;
    gap: 0.625rem;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
}

.comment-date {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.comment-text {
    font-size: 0.8125rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

.comment-form {
    display: flex;
    gap: 0.625rem;
    margin-top: 0.75rem;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    gap: 0.5rem;
}

.comment-input {
    flex: 1;
    padding: 0.5rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.send-comment-btn {
    background: #0E7581;
    color: #ffffff;
    border: none;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.send-comment-btn:hover {
    background: #0d9488;
}

.send-comment-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.login-message {
    font-size: 0.8125rem;
    color: #6b7280;
    font-style: italic;
    margin: 0.75rem 0 0 0;
}

.load-more-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}

.load-more-btn {
    background: #0E7581;
    color: #ffffff;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-more-btn:hover {
    background: #0d9488;
}

.load-more-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.project-update-error {
    padding: 1rem;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

@media (max-width: 768px) {
    .project-update-wrapper {
        border-radius: 0;
    }

    .project-update-header {
        padding: 1rem;
        border-radius: 0;
    }

    .project-update-title {
        font-size: 1.125rem;
    }

    .project-update-content {
        padding: 1rem;
    }

    .phase-body {
        padding: 0.75rem;
    }

    .activity-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .activity-badges {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .activity-title {
        white-space: normal;
    }

    .comment-form {
        flex-direction: column;
    }

    .comment-input-wrapper {
        flex-direction: row;
    }

    .time-badge,
    .status-badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .activity-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-input-wrapper {
        flex-direction: column;
    }

    .send-comment-btn {
        width: 100%;
        justify-content: center;
    }
}
